Be lazy about loading screenshots for apps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Apps Directory |
Fix Released
|
Medium
|
Anthony Lenton |
Bug Description
Screenshots for most applications (the ones from main+universe) are currently all retrieved from screenshots.
This adds ~1 to ~3 seconds *per app* to the run time for this command. Having 30k apps in universe this means the command will take several hours to run. I believe we wouldn't even be able to import all five lucid - precise distros in a whole day.
It would be better if screenshots were like reviews: On the application details page there's a static link to the screenshots, and that's replaced via ajax with a carousel widget on page load. The screenshots themselves are on a separate page, that can be cached for several hours so that they're not reloaded for every request.
If it makes a difference, I think ideally screenshots would be loaded just *before* the reviews, as they appear above the screen fold.
Related branches
- Danny Tamez (community): Approve
-
Diff: 760 lines (+302/-135)15 files modifieddjango_project/config/main.cfg (+3/-1)
src/webcatalog/admin.py (+12/-0)
src/webcatalog/api/urls.py (+8/-7)
src/webcatalog/management/commands/import_app_install_data.py (+0/-25)
src/webcatalog/static/css/carousel.css (+13/-30)
src/webcatalog/static/js/carousel.js (+14/-13)
src/webcatalog/templates/webcatalog/application_detail.html (+0/-4)
src/webcatalog/templates/webcatalog/application_screenshots.html (+25/-0)
src/webcatalog/templates/webcatalog/screenshot_widget.html (+67/-23)
src/webcatalog/tests/test_commands.py (+0/-30)
src/webcatalog/tests/test_utilities.py (+34/-0)
src/webcatalog/tests/test_views.py (+89/-2)
src/webcatalog/urls.py (+2/-0)
src/webcatalog/utilities.py (+22/-0)
src/webcatalog/views.py (+13/-0)
Changed in ubuntu-webcatalog: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in ubuntu-webcatalog: | |
status: | Confirmed → In Progress |
assignee: | nobody → Anthony Lenton (elachuni) |
milestone: | none → 12.04 |
Changed in ubuntu-webcatalog: | |
status: | In Progress → Fix Released |