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: avoid QFile::readall when loading resources #1196

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

shenlebantongying
Copy link
Collaborator

This should avoid copying from QByteArray to std::vector

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@xiaoyifang
Copy link
Owner

What is the performance comparison?

@shenlebantongying
Copy link
Collaborator Author

Very little. Only impactful when reading hundreds of megabytes of images on older computers 😅

@xiaoyifang xiaoyifang merged commit 337fe7d into xiaoyifang:staged Oct 6, 2023
13 checks passed
@xiaoyifang
Copy link
Owner

xiaoyifang commented Oct 6, 2023

Maybe the performance issue lies in the webengine, when webengine render a large image(file), it read chunk by chunk with max size 65536 bytes each chunk. from the logs I can see that the first few chunks cause more time.

lock or some thing else ,I can not be sure.

@shenlebantongying shenlebantongying deleted the faster_img_loading branch March 21, 2024 22:28
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.

2 participants