-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
Build CEF without tcmalloc global hook on Linux #73
Comments
To get this to work place this in your ~/.gyp/include.gypi:
Also you need to remove a dependencie in cef.py to make it build. Find:
Remove the line:
This could be better to add a conditional in this file, as suggested here: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10496 Original comment by |
I'd like to add that the file where one should remove the "<(DEPTH)/base/allocator/allocator.gyp:allocator'," line is not "cef.py", but "cef.gyp" instead, located in the root directory where cef sources are (./chromium/src/cef/cef.gyp). This should be fixed in the BuildOnLinux wiki page. Regards Original comment by |
The new cefpython 31.0 binary release will have tcmalloc disabled. Original comment by
|
It seems that on Linux the tcmalloc implementation is hooked globally when importing the CEF library, this might cause troubles when CEF is not the very first library being loaded in the application. See this topic for more details: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10850
If you do not import cefpython as the very first module, you may be getting random unrelated segmentation faults all over your app. Adding or removing some code might fix the crash, as it changes memory layout, but the crashes will be returning.
Tested performance using real browser test at peacekeeper.futuremark.com. The version with tcmalloc disabled is faster by 2.3% (4804 tcmalloc disabled vs 4695 tcmalloc enabled). See comparison: https://docs.google.com/document/d/1_X2F9Ax6opGYGVDP_N6UC8AKA37eG8h8Jf3bwFj7RS4/edit?usp=sharing
I've run cefclient javascript tests with tcmalloc enabled/disabled. In javascript test 1 which tests creation of cef v8 types (int, bool, string), tcmalloc is faster by about 30-40%. In javascript test 2 which tests speed of function execution with different types returned, tcmalloc doesn't make much difference, sometimes it is a bit faster sometimes a bit slower. The CEF javascript tests 1 and 2 are not really about js performance. See this post for an explanation:
http://www.magpcss.org/ceforum/viewtopic.php?p=20129#p20129
See comparison table of cefclient javascript test 1:
https://docs.google.com/document/d/1ykllgRgA0FqXKMQ-O3LkqcRjVOYVRY63dWLvAhWw4a8/edit?pli=1
Cefclient javascript tests 1 and 2 for tcmalloc enabled:
https://docs.google.com/document/d/1SuEN8Mi1hpPuFtDJ6FxOBYOor3Euao__kY1raMNvnpY/edit?pli=1
Cefclient javascript tests 1 and 2 for tcmalloc disabled:
https://docs.google.com/document/d/1R033Nip4-O_yMvE_oLJutrWj6qrdmpb5HoozDVOqCAE/edit
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 16 Jul 2013 at 8:23The text was updated successfully, but these errors were encountered: