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
Make xul.dll work better with high memory #89
Comments
Is this also true for the latest beta3 build of Firefox 24.8.1? |
On 01/05/15 01:50 AM, wztest wrote:
Yes. |
Yes, I found exactly the same thing. Unfortunately, it happened some hours after the Beta 3 release so it will be fixed in the next beta (soon). BTW, this is very inconvenient to care about individual files and function calls here. And since we don't have any way to make gcc automatically include os2safe.h whenever os2.h is included, the best we can do here is to do it ourselves (there are about 118 files in Mozilla using os2.h that need to be changed) and declare a rule that each file including os2.h must also include os2safe.h by default (unless it is absolutely necessary to not include it). I will do such a change and report here. |
What about changing os2.h? we don't use the ibm toolkit, so we can modify headers. And such kind of change will be available to all apps built with gcc (in the rpm env). |
Well, this is an option too. But the fun thing is that Knut has already fixed this properly by making sure So I will just rebuild Mozilla when libc 0.6.6 RPMs are out and the problem will go away. |
I've had good results running SeaMonkey and Thunderbird with xul.dll marked to load both code and data into high memory since rebuilding with libc066, especially compared to lib065 where SM wouldn't even run when xul.dll was marked with -b. |
I've rebuilt Firefox with the latest RPMs of gcc 4.9.2 and libc 0.6.6. The size of many DLLs has decreased by some dozen percent. In particular, XUL.DLL is now 47M instead of 55M before (i.e. 8M less which is surely not bad). I also tried marking all DLLs for high mem (with highmem.exe -b). It starts and seems to work, no crashes. One strange thing I noticed though is that Qt 4 apps (e.g. kdiff3) don't want to run after I start highmem-enabled Firefox (a crash in Here are some statistics of the firefox.exe launch taken using Theseus4 -> Process -> Memory Utilization (no browsing, just let it fully start, take the metrics and then close, 2 tries each, sizes are in megabytes, roughly rounded):
As we may see, changing the compiler saves us about 5-6 megabytes of shared memory which is not bad I think. What puzzles me though is why highmem-enabled Firefox uses less shared memory. Perhaps, this Theseus4 function gives you only low memory statistics, that would explain it. I need tot ry a different report. |
Here is the memory footprint comparison based on the memory occupied and allocated by private objects and shared objects of the Firefox process (also, in megabytes):
This shows that Beta 4 uses about 10 megabytes less than Beta 3 due to the compile switch. There is (expectedly) no difference between the normal Firefox and the highmem-enabled one. These metrics don't show how high memory usage changes between Beta 3 and Beta 4 and (which is more important) between the normal Beta 4 version and its highmem-enabled counterpart. I couldn't find a pre-defined report for such purpose in Theseus. There is the Linear Usage by Process report where such kind of information could be perhaps derived from but it contains too much raw data and needs some post-processing in order to extract useful bits. If anybody knows a different way of get this information out of Theseus you are welcome to share it with me. With this, I'm closing the issue as the main problem is solved now. |
On 02/20/15 11:49 AM, Dmitriy Kuminov wrote:
I haven't had problems launching sh.exe or kdiff3 or qupzillia while |
That's strange since I have it 100% reproducible here. Need investigation (when time permits). |
While the updated os2lib and os2safe.h helped with making Firefox 10.0.12's xul.dll work with high memory, it didn't with 24.8.1. Seems that xpcom/io/nsLocalfileOS2.cpp no longer includes os2safe.h before os2.h. Examining the symbols shows that it is using DosQueryDBCSEnv rather then SafeDosQueryDBCSEnv
Thanks to os4user for finding this problem, I fixed it with this,
The text was updated successfully, but these errors were encountered: