Skip to content
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

Closed
GoogleCodeExporter opened this issue Aug 28, 2015 · 3 comments
Closed

Build CEF without tcmalloc global hook on Linux #73

GoogleCodeExporter opened this issue Aug 28, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 16 Jul 2013 at 8:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant