-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use lib.protocol recycle mechanism #14
Conversation
I refactored some functions reported as time consuming by the profiler:
Performance has increased to 0.45 Mbps.
There's still intrepreted and garbage collected code reported so there's room for more optimizations.
|
a889013
to
d4cd800
Compare
I'm interesting in potentially reusing the datagrams/headers at some point rather than just recycling them, but this is a step in the right direction. The tests still pass with this change. Would you do similar work on icmp.lua before merge? |
Calling :free() on objects from lib.protocol puts the object on a list of unused objects in the corresponding class. The next call of the class's constructor will return an object from the free list or create a new one if the list is empty.
d4cd800
to
683c889
Compare
Use lib.protocol recycle mechanism
Add l7fw app and `snabb wall filter`
Add LuaJIT test suite as submodule & integrate with Travis-CI
Makes objects from lib.protocol to use their "recycle" mechanism. After using an object, call object:free() to add the object to a list of unused objects in the corresponding class. This avoids calling the code protected under the "recycle" flag in the lib.protocol classes.
More info: http://comments.gmane.org/gmane.network.snabb.devel/1009
Performance improves slightly: