View Single Post
Old 09-04-2014, 12:52 PM   #200
kaufman
Calibre Companion Fanatic
kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.
 
kaufman's Avatar
 
Posts: 873
Karma: 1088610
Join Date: Nov 2006
Device: Galaxy Note 4, Kindle Voyage
Quote:
Originally Posted by chaley View Post
I just tried an experiment. The effect on performance is very large. The problem is that the booklist cell must be laid out onto the screen before CC can find how many lines are required to hold the author(s) plus (if it is defined) the series. Once the layout is finished then the computations can be done, which will trigger a second layout. All of this happens while flinging, which makes the screen stutter.

Sorry, but I am going to say "no" to this one.
What if instead of doing it that way, you did it by taking the current font size and determining how many characters per line that was. Then you could internally just convert the number of lines to a number of characters and continue the way you do now. This wouldn't be an exact answer because of kerning, but it would get you a pretty good result. If you cut the internal character count by 5%, you would probably never go over the number of lines requested and it would still work well.

If the non-deterministic-ness of this bothers you, I withdraw the suggestion.
kaufman is offline   Reply With Quote