-
Notifications
You must be signed in to change notification settings - Fork 938
[port] use ragel-bitmap for less memory #1624
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
/cc @ahorek |
Required removing all lib/mail/parsers/*_parser.rb and then running `rake ragel:generate`.
@ahorek it seems received_parser.rb was unchanged in the ragel-bitmap PR. This makes sense as the timestamps of the rl-files hadn't changed. Could you approve this PR so it can be merged? I'll add the extra commit to 2-8-stable. |
Nicely spotted! Thanks for catching that. |
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.
👍
The approval needs to be from someone with commit rights, it seems... mind to help out with this ported PR @sebbASF ? |
Sorry, but I'm not convinced that this is a worthwhile change. |
@sebbASF how would you suggest to move fw? |
Is there really a need to change? |
Compared to other dependencies, this gem has a disproportionately large memory footprint for a simple email parser. This is primarily because Ragel doesn’t generate efficient code for Ruby, and Ruby doesn’t handle large numeric arrays optimally. I don’t believe this complicates the build process. Modifying the Ragel sources requires recompilation regardless, and there’s already a rufo formatter in place. Additionally, the parsers were last updated in 2017, so this change shouldn’t increase maintenance costs. |
I think this would be a worthwhile change, but ultimately I wouldn't be the one maintaining it so I don't think I can weigh in very heavily. I believe the memory savings are good, but if it's too complicated to understand maybe it's not worth it. |
I think the addition of benchmarks in this PR would be a worthwhile addition, either in the original PR description or as a comment here. Show us your data :) |
This may have already been merged in #1623. |
It was only merged into the 2.8 branch except for #1630 |
port of #1623