← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/render into lp:openlp

 

The proposal to merge lp:~googol/openlp/render into lp:openlp has been updated.

Description changed to:

Hello,

1) improved rendering speed
My assumption was, that the majority of verses/chorus will fit on a slide. That is why we first check if the verse/chorus fits as a whole and if it does we do not do any further rendering. For those verses/choruses the rendering is very fast because we need to load the slide text only once.
If it does not fit, then we use the binary chop algorithm to process the slide text.

2) clean ups/simplifications
- do not use instance variables as arguments
- renamed image_manager to imageManager and theme_manager to themeManager as the class is based on Qt

Concrete changes I made:
- moved the binary chop algorithm to its own method
- made the binary chop less 'word by word' specific (line ending/separator)
- Improved "detection" when to use which method to render an item. (The _paginate_slide_words is able to render the text without help, thus we do not need to render the text first with _paginate_slide and then *again* with _paginate_slide_words.)

Test results:
As test data I chose the song "Amazing Grace" and "Esther 7-8". As themes I used three themes (based on "Sea with tress" with 40, 50 and 65pt as main font size).

I created a service file for you (http://ubuntuone.com/p/yyM/) My test items were:
Amazing Grace 40
Amazing Grace 50
Amazing Grace 65
Esther 7-8 (Verse per Slide)
Esther 7-8 (Verse per Line)
Esther 7-8 (Continuous)

The numbers stand for the main font size (theme) they use. "Amazing Grace 65" does not have verse 6 (instead verse 5 and verse 6 were merged and separated with a soft break). Bibles verses have been rendered with 65pt.

I enabled the service file auto load and measured the times (time speed in the (outer) for loop in the render method in serviceitem.py). Each result represents the time needed for one item.

branch (average of two)
0.174 <- Amazing Grace 40
0.314 <- Amazing Grace 50
0.462 <- Amazing Grace 65
4.431 <- Esther 7-8 (Verse per Slide)
3.490 <- Esther 7-8 (Verse per Line)
3.496 <- Esther 7-8 (Continuous)

trunk (average of two)
0.276
0.555
0.708
4.615
4.353
4.490

For more details, see:
https://code.launchpad.net/~googol/openlp/render/+merge/66253
-- 
https://code.launchpad.net/~googol/openlp/render/+merge/66253
Your team OpenLP Core is subscribed to branch lp:openlp.


References