-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Increases chunk size in SMask composition to 1M pixels #5524
Increases chunk size in SMask composition to 1M pixels #5524
Conversation
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/158e2816d990bed/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/bb05148fdbf247d/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/158e2816d990bed/output.txt Total script time: 20.69 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/bb05148fdbf247d/output.txt Total script time: 23.88 mins
|
this might be pure guessing, but afaik this causes the memory to be used on the graphics card instead of main memory. |
Its a 4 times improvement for referenced doc on page 10 for me. after: |
Increases chunk size in SMask composition to 1M pixels
Really good. Thanks! |
This PR increases the chunk size for SMask composition from 64k to 1M pixels to speed up #5515.
Chunking avoids the duplication of large buffers when
ctx.getImageData()
is called in favor for the duplication of many small buffers. But since callingctx.[get|put]ImageData()
is soo slow, too small chunks slow down SMask processing significantly.The 1M chunk size makes decoding #5515 several times faster (unless the zoom level is very small). Issue #2648 renders also noticeably quicker.
I was surprised so see that this PR also reduces peak memory consumption:
(using win7 x64, pdf from issue 5515 at zoom=200, http://www.partnerplast.com/images/seismikk/2844_PPMSG_Seismic_REV_012014_PREVEIW.pdf#zoom=200&page=10)