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

Don't build unused Qt features; use all cores #236

Merged
merged 6 commits into from Aug 20, 2019
Merged

Don't build unused Qt features; use all cores #236

merged 6 commits into from Aug 20, 2019

Conversation

native-api
Copy link
Contributor

@native-api native-api commented Aug 17, 2019

This drastically reduces Qt compilation time and reduces the resulting image size by about 440M.

The resulting libs included into the wheel are reduced by about 600k.

I've checked that none of the excluded features are used:

  • OpenCV only directly links to QtCore, QtGUI and QtTest -- and consequently, these are the only ones included into the manylinux1 wheel by auditwheel.
  • Likewise, I checked that all the imports from those used by OpenCV are present in the reduced version.
  • There's an issue for me with no icons in Qt imshow() UI. But it's also present in the vanilla wheel.
  • Also considered -no-nis and -no-cups but ultimately decided against them: I'm not sure that the UI has no printing capabilities. (NIS support is used solely to discover network printers.)
  • Likewise, didn't touch stuff like X features support: there's no such easy way to make sure they are not used.

Merge conflicts with #229 are all but guaranteed.

@skvark
Copy link
Member

skvark commented Aug 18, 2019

Thank you, that's a quite big change in the image size. I don't think people are using OpenCV to build actual user interfaces so the icon issue is not a big deal.

There are indeed some merge conflicts which must be resolved before merge.

@skvark skvark merged commit 87fbd56 into opencv:master Aug 20, 2019
@native-api native-api deleted the strip_qt branch Aug 20, 2019
skvark pushed a commit that referenced this pull request Sep 5, 2019
* Don't build unused Qt features; use all cores

* cmake does bootstrapping, too; comment unclear steps

* Use Docker comment syntax

* tab to space
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

Successfully merging this pull request may close these issues.

None yet

2 participants