Powerpoint is slow to load
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenLP |
Confirmed
|
Wishlist
|
Tomas Groth |
Bug Description
Originally reported in forum: https:/
The problem is that when we load a PPT we generate thumbnails for the preview and the slidecontroller, and extract notes and titles for showing on the stage view. This data is stored in a folder which name is a md5-hash of the full path of the ppt-file.
When a presentation is placed in the servicemanager, the file is copied to the servicemanager folder, and when going live OpenLP creates a hash of the new full path of the file (now in the servicemanager folder) which of course is different from the old hash, and therefore OpenLP generates the thumbnails etc again.
A few solutions could be made:
* Make the hash based on the file content instead of the file path (might be a bit slow on big files).
* When adding a ppt-file to the servicemanager, copy the old folder to the new hash-folder.
* Add the thumbnails etc to the service file.
Related branches
- Raoul Snyman: Needs Information
-
Diff: 964 lines (+279/-81)12 files modifiedopenlp/core/common/__init__.py (+15/-0)
openlp/core/lib/serviceitem.py (+80/-19)
openlp/core/ui/servicemanager.py (+77/-29)
openlp/plugins/images/lib/db.py (+3/-1)
openlp/plugins/images/lib/mediaitem.py (+3/-2)
openlp/plugins/images/lib/upgrade.py (+22/-3)
openlp/plugins/presentations/lib/mediaitem.py (+2/-1)
openlp/plugins/presentations/lib/presentationcontroller.py (+29/-4)
openlp/plugins/presentations/presentationplugin.py (+1/-1)
tests/functional/openlp_core/lib/test_serviceitem.py (+24/-14)
tests/functional/openlp_plugins/images/test_lib.py (+19/-5)
tests/interfaces/openlp_core/widgets/test_views.py (+4/-2)
Changed in openlp: | |
assignee: | nobody → Tomas Groth (tomasgroth) |
Alternatively base the hash on:
<file name without the hash>+<file size in bytes>+<last modification date>
And then make sure the last modification date is not changed when it is copied into the servicemanager folder.
If currently only the full file name is used in the hash what happens when a new version of the file is copied over the original? Do the thumbnails get regenerated? Adding the size and mod-time to the hash would address this too, but if there already is some mechanism to spot and cope with this it could cause a conflict.