Improve performance of song loading for Preview/Live

Bug #856296 reported by matysek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Low
Unassigned

Bug Description

I think we should try to optimize song loading for Preview/Live because users will often double click on a song in song list and want to see the preview of the song.

Related branches

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

We actually have been doing this for a while. Chat with Tim and Andreas about it.

Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

I think the rendering is good at the moment. Currently I do not know how we could improve it further.

Maybe we can improve the preview image display, because it seems that it takes some additional time to be build (verse list is rendered/displayed, but the image not).

        if not self.screens.current[u'primary'] and self.serviceItem and \
            self.serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay):
            # Grab now, but try again in a couple of seconds if slide change
            # is slow
            QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
            QtCore.QTimer.singleShot(2.5, self.grabMainDisplay)
        else:
            self.slidePreview.setPixmap(
                QtGui.QPixmap.fromImage(self.display.preview()))

http://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/core/ui/slidecontroller.py#L983

If we can remove the timers somehow, we should be able to make it snappier in some (!) cases.

Revision history for this message
Tim Bentley (trb143) wrote :

This code is not added for OpenLP but for Powerpoint etc to allow Powerpoint to render a screen and then the preview to be updated.
This will be relevant to all items with this capability ItemCapabilities.ProvidesOwnDisplay so needs to be handled with care.

For Songs , Images etc there is a loop in the maindisplay code which waits for QWebKit to say it has finished painting the screen. This is a QT triggered event with a 0.1 sec timer to allow the machine to not get loop tied up.

Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

I am going to improve the performance of the preview display (the little frame with an image of the preview/live display).

Changed in openlp:
assignee: nobody → Andreas Preikschat (googol)
importance: Undecided → Low
milestone: none → 1.9.8
status: New → In Progress
Changed in openlp:
status: In Progress → Fix Committed
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.