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

Use multithreading when processing batches of thumbnails #19

Closed
ghost opened this issue Feb 12, 2015 · 4 comments
Closed

Use multithreading when processing batches of thumbnails #19

ghost opened this issue Feb 12, 2015 · 4 comments
Milestone

Comments

@ghost
Copy link

ghost commented Feb 12, 2015

Hi, compared to the old Gallery, this one does no longer split 1st preview generation into seperate threads/requests (~1/4 of speed or slower) and it does not load in IE11 (spinning wheel).

@oparoz
Copy link
Contributor

oparoz commented Feb 12, 2015

@f-s - By old Gallery, do you mean the app which shipped with oC7 or the one which shipped with oC8? If you're a coder, do you know exactly where the code did initiate those threads?

Issue about IE11 compatibility: #21

@ghost
Copy link
Author

ghost commented Feb 13, 2015

By old Gallery i mean the oC7. Here the gallery also loaded/displayed line by line, on the first thumb gen, but core/thread/requests (for thumb gen) are filed in parallel, so you get full CPU usage on the server on all cores: i.e. during thumb gen of a single gallery ~4x the speed on a quadcore CPU. The new oC8 does only use a single core and does sequential thumb gen. Thank you :-)

@oparoz oparoz changed the title IE11: no function / no multithreading on first preview generation in OC8 Use multithreading when processing batches of thumbnails Mar 3, 2015
@oparoz
Copy link
Contributor

oparoz commented Mar 3, 2015

Assessment

On oC7, each thumb was requested individually, which allowed PHP to process them in parallel.
On oC8, we send multiple batches of thumbnails to process and PHP processes these batches in parallel.

Solution

By fixing the way batches are prepared and by lowering the amount of thumbnails asked in each request, it's possible to trigger parallel execution on the server, at the cost of using more HTTP requests

A folder with 25 pictures is currently making 2 requests and nothing is happening until the first request for 20 thumbnail is completed.
With the proposed solution, 5 requests would be made and rendering would be blocked in groups of 5.

For maximum benefit, this has to be implemented #29

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@oparoz oparoz added this to the 2.0.6 milestone Apr 7, 2015
@oparoz
Copy link
Contributor

oparoz commented Apr 7, 2015

From 2.0.6, thumbnail batches are smaller, which should trigger parallel processing.

@oparoz oparoz closed this as completed Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant