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

Image loading performance enhancements [v3] #394

Merged
merged 8 commits into from
Apr 14, 2019

Conversation

gunnsth
Copy link
Contributor

@gunnsth gunnsth commented Mar 31, 2019

Addresses #393 at least partly. The performance is still expected to be poor for colored JPG images, as those images still are converted to RGBA.

Avoid redrawing RGBA images again if loaded.
Change EncodeBytes for CCITTFaxDecode to assume data with 1 color component rather than 3.
CCITT rendering has changed slightly (visual comparison looks good).
@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #394 into v3 will decrease coverage by 0.03%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v3     #394      +/-   ##
==========================================
- Coverage   61.28%   61.24%   -0.04%     
==========================================
  Files         153      153              
  Lines       27631    27646      +15     
==========================================
- Hits        16934    16933       -1     
- Misses      10304    10319      +15     
- Partials      393      394       +1
Impacted Files Coverage Δ
pdf/core/encoding.go 49.34% <100%> (ø) ⬆️
pdf/model/image.go 57.5% <60.86%> (-1.69%) ⬇️
pdf/creator/image.go 84.32% <80%> (-0.38%) ⬇️
pdf/model/xobject.go 63.26% <0%> (-1.46%) ⬇️
pdf/creator/creator.go 74.92% <0%> (-0.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1433f04...583666d. Read the comment docs.

@gunnsth gunnsth added this to the v3.0.0-rc.1 milestone Apr 2, 2019
@gunnsth gunnsth requested a review from adrg April 14, 2019 15:28
Copy link
Collaborator

@adrg adrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me.

@gunnsth gunnsth merged commit 4ba3468 into v3 Apr 14, 2019
@gunnsth gunnsth deleted the v3-image-loading-perf-enhancements branch April 14, 2019 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants