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

Fix the bug of loading shared libraries. #561

Merged
merged 3 commits into from
Feb 14, 2021
Merged

Fix the bug of loading shared libraries. #561

merged 3 commits into from
Feb 14, 2021

Conversation

Xianguang-Zhou
Copy link
Contributor

@Xianguang-Zhou Xianguang-Zhou commented Feb 10, 2020

Purposes:
1. Reduce the CPU usage of "qt.py" for Windows.
2. Fix the bug of loading shared libraries.

@Xianguang-Zhou Xianguang-Zhou changed the title Reduce the CPU usage of "qt.py" for Windows. Reduce the CPU usage of "qt.py" for Windows. Fix the bug of loading shared libraries. Feb 10, 2020
@cztomczak
Copy link
Owner

How does the "external_message_pump" option exactly affect performance? How did you test it? What versions of qt did you test with? (pyqt4, pyqt5, pyside, pyside2).

What is the bug with loading shared libraries?

@Xianguang-Zhou
Copy link
Contributor Author

Xianguang-Zhou commented Jun 6, 2020

  1. On Windows, if the "external_message_pump" option is not true, the CPU usage is about 10%. If the "external_message_pump" option is true, the CPU usage is about 0%.
    I tested it with PySide2.

  2. If a process overrides the "LD_LIBRARY_PATH" environment variable, the subprocesses will not be able to find other shared libraries by the original "LD_LIBRARY_PATH" environment variable.

@cztomczak
Copy link
Owner

Please be specific. Tested on what website and what OS? What are you doing in app that it hits 10% CP U?

What other shared libraries CEF Python needs to find in OS through LD_LIBRARY_PATH? Is it your app specific libraries? Provide specific information on your issue.

@Xianguang-Zhou
Copy link
Contributor Author

Xianguang-Zhou commented Jun 6, 2020

  1. Tested on Windows 10 1809.
    I did almost nothing in the application: qtcef.py

  2. The other shared libraries to find through LD_LIBRARY_PATH are libpython libraries.
    For example: libpython3.6m.so.1.0

@cztomczak
Copy link
Owner

The patch is for qt.py example, Does the issue reproduce with the original example on google website?

@Xianguang-Zhou
Copy link
Contributor Author

Sorry, I don't know what the original example on google website you said.

@cztomczak
Copy link
Owner

The one you're sending the PR for.

@Xianguang-Zhou
Copy link
Contributor Author

Xianguang-Zhou commented Jun 10, 2020

I'm terribly sorry.
The original "qt.py" has no CPU usage issues on Windows 7.
The cause of the CPU usage issue may be a bug of Windows 10 1809.
So I plan to delete the commit: 5b6aed9

@Xianguang-Zhou Xianguang-Zhou changed the title Reduce the CPU usage of "qt.py" for Windows. Fix the bug of loading shared libraries. Fix the bug of loading shared libraries. Jun 10, 2020
@Xianguang-Zhou
Copy link
Contributor Author

I have deleted the commit of enabling the "external_message_pump" option.

@cztomczak
Copy link
Owner

I will merge it during next release.

FYI: It might be better to get rid of LD_LIBRARY_PATH entirely and link via rpath/$ORIGIN.

@Xianguang-Zhou
Copy link
Contributor Author

Thank you very much.

@cztomczak cztomczak merged commit 019033d into cztomczak:master Feb 14, 2021
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