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

libxml2 should be compiled with "-O2" #2022

Closed
flavorjones opened this issue Apr 18, 2020 · 1 comment
Closed

libxml2 should be compiled with "-O2" #2022

flavorjones opened this issue Apr 18, 2020 · 1 comment

Comments

@flavorjones
Copy link
Member

The vendored libxml2 is being compiled with no optimization. This causes slow performance in some cases, e.g. #2020

This is caused by CFLAGS being set by default to -fPIC by process_recipe in ext/nokogiri/extconf.rb. When libxml2 is configured with any CFLAGS set, then it is compiled without optimization.

This issue is to ensure that libxml2 is compile with -O2 which appears to be the default in libxml2's configure script for gcc.

Final challenge: MiniPortile (and so process_recipe) requires that environment variables be passed as configure_options which means that later applications of, e.g. CFLAGS=something may override earlier applications. I think we should clean this up along the way, because it's making some things (like this) harder.

@flavorjones flavorjones added this to the v1.11.0 milestone Apr 18, 2020
@flavorjones
Copy link
Member Author

libxml2 should probably also be compiled with -g, which is also the default and being overridden by the vendored library build process.

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

Successfully merging a pull request may close this issue.

1 participant