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

precreate/cache thumbnails #92

Closed
matt-deboer opened this issue Jan 30, 2019 · 6 comments · Fixed by #149
Closed

precreate/cache thumbnails #92

matt-deboer opened this issue Jan 30, 2019 · 6 comments · Fixed by #149
Labels
priority: medium type: enchancment Adds to an existing feature

Comments

@matt-deboer
Copy link
Contributor

Enhancement
I've noticed that on a dataset with multiple pages, each click of the paging controls results in request for many thumbnails--which are all generated on the fly (causing the server to bog down temporarily as all of those images are generated--and many of them thrown away).

Perhaps it would be better to pre-create these thumbnails with filename according to some version field on the image_model whenever the particular image is updated; that would allow them to be cached on the server's filesystem and even on the client's browser--if they were fetched according to that individual image_model's version... what do you think?

@jsbroks jsbroks added priority: medium type: enchancment Adds to an existing feature status: available Issue is open for anyone labels Jan 31, 2019
@jsbroks
Copy link
Owner

jsbroks commented Feb 1, 2019

I was thinking of creating a /_thumbnail inside the datasets directory to hold generated thumbnails on save. Then return them to the users, but this method wouldn't support caching in the web browser

@AdanMora
Copy link
Contributor

@jsbroks Hi, I want to highlight the importance of this issue, when you have really huge images and hundreds of annotations, the thumbnail loading process blows up the server, other issue is when click an image to make/edit annotations, in the background the thumbnail process is still running, so you cannot use the tool properly, I think the best way is write the thumbnails in the new folder outside of the datasets folder (even write them with the annotation's preview if it is possible).

Thanks.

@jsbroks
Copy link
Owner

jsbroks commented Mar 14, 2019

@AdanMora which version of the annotator are you using.
This issue you mentioned sounds like is more then just the caching of the annotations. Currently, multiple threading in production is not being handled properly

@AdanMora
Copy link
Contributor

I already update my version, so I think I'm using the last one, the problem is that the annotator gets busy calculating always the thumbnails, and for example I have a dataset with images with a huge size more the 3000x5000 pixels, with a lot of annotations per image, example:

thumbnails

It tries to charge all the thumbnails even if you enter to an image. I made a little patch to save the thumbnails in disk and increase a lot the performance and solves this problem. Above you can see the images already loaded with its thumbnail written on disk while the other images are loading its thumbnail.

@jsbroks
Copy link
Owner

jsbroks commented Mar 14, 2019

@AdanMora
Would be greatly appreciated if you could put a PR in with the changes you have made

@AdanMora
Copy link
Contributor

@jsbroks Ok, I'll make it pretty and clean, then I'll put the PR, thanks.

@jsbroks jsbroks added status: in progress Issue is being worked on and removed status: available Issue is open for anyone labels Mar 19, 2019
@jsbroks jsbroks assigned jsbroks and unassigned jsbroks Mar 19, 2019
@jsbroks jsbroks removed the status: in progress Issue is being worked on label Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium type: enchancment Adds to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants