Closed db4 closed 5 years ago
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!
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.
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.
I'll give it a try!
See #64. @db4 does this look good to you?
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.