Repository navigation
Conversation
Collaborator
|
Thanks! On large projects, there could be several hundreds of thousands of relocations, so the overhead might not be so small. I'll try to evaluate that on my side, but if you have real-size projects to test, feel free to do some timings on your side as well! |
Collaborator
|
I just checked, we have more than 67000 relocations on a given .cmxs file. Assuming the 7 microsecond timing is accurate, this would mean adding about half a second load time. |
Collaborator
|
I've confirmed that adding two calls to allow_write for each relocations significantly increase the time to load the .cmxs file I mentioned above (from 0.20s to 0.65s). One should look for the second version. |
Collaborator
|
I'll give it a try! |
alainfrisch
added a commit
that referenced
this pull request
Aug 1, 2018
Another take at #57, avoiding repeated calls to VirtualProtect on the same pages for performance reasons.
Collaborator
alainfrisch
added a commit
that referenced
this pull request
Aug 2, 2018
* Fix problem with setting page permission during relocation Another take at #57, avoiding repeated calls to VirtualProtect on the same pages for performance reasons. * Changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My original report in email to Alain Frisch, Nov 25 2013:
Alain's response:
Now I can prove that the performance impact of the second (slow) variant is negligible. I see the following figures for test project then FLEXDLL_DEBUG is enabled:
So one
VIrtualProtect()call takes about 7 microseconds on my hardware. For a real DLL with even hundreds of relocations it would be several milliseconds, not more.