-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization of msgpack::zone size on the stack and deferred memory allocation #1089
Optimization of msgpack::zone size on the stack and deferred memory allocation #1089
Conversation
Thank you for sending the PR. I will review it. But I need a time, please wail a couple of weeks. |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## cpp_master #1089 +/- ##
===========================================
Coverage 85.75% 85.75%
===========================================
Files 80 80
Lines 5091 5091
===========================================
Hits 4366 4366
Misses 725 725 |
Let me clarify your issue. I think that you can use Which size is reduced to 24 bytes from 54 bytes? |
I guess that your issue is the following allocation. (original code) msgpack-c/include/msgpack/v1/detail/cpp11_zone.hpp Lines 111 to 114 in 37fcaa1
Is that right ? |
Yes, the Due to the fact that msgpack header only library I have no problem with not putting this code into the general library for whatever reason, but I thought it might be useful to others as well. |
Thank you for the comment.
I understand the updating points. Next step, I will do some performance tests. |
No siginificant performance difference has been observed. Let's move on the next step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my late review. I had a cold for a long time.
I added review comments:
In addition, please apply the same fix to
https://github.com/msgpack/msgpack-c/blob/cpp_master/erb/v1/cpp03_zone.hpp.erb
and then, execute https://github.com/msgpack/msgpack-c/blob/cpp_master/preprocess to generate the C++03 codes form the erb template.
(ruby is required)
Finally, add a commit including erb and updated heders.
I also translated the process script completely into ruby, because it is not very convenient to run the generation under windows |
d565704
to
c254c5c
Compare
Thank you for updating. |
All windows builds are failed on github actions. I guess that the failure is caused by environmental issue. I'm not sure the reason but dart support removal could be relased. I also create #1095 to investigate the issue. It is just for testing. I will close #1095, when the issue would be solved. Unfortunately I don't have much time to investigate it. Perhaps, the issue would be solved by the environment update. In this case, we need to just wait for updating. If you find a solution, please add a commit. |
5cb7837
to
add68ff
Compare
Yes, I've seen the problem of plugging in dependencies, I think there was already a similar zlib issue recently. Unfortunately I have no experience with ci github and appveyor in particular, so I can't help much here. |
Thank you for the comment. I will investigate the issue more when I have a time. NOTE: zlib issue has been solved by #1090 and #1091 . Fortunately they were simple version issue. |
I solved the issue. |
Reduced zone size from 54 to 24 bytes for x64 and added delayed allocation of the first chunk as needed.
In case when there are a lot of non-large objects that require serialization in msgpack::objects it is very expensive to allocate memory just to create a zone to use the adapter