[Okular-devel] Epub qtextdocument high cpu usage

Albert Astals Cid aacid at kde.org
Mon Jun 17 18:01:56 UTC 2013


El Dilluns, 17 de juny de 2013, a les 21:42:23, Jaydeep Solanki va escriure:
> On Sun, Jun 16, 2013 at 8:42 PM, Albert Astals Cid <aacid at kde.org> wrote:
> > El Diumenge, 16 de juny de 2013, a les 20:29:37, Jaydeep Solanki va
> > 
> > escriure:
> > > Hello,
> > > As I was finding it difficult to make progress using webkit to render
> > 
> > epub,
> > 
> > > I spent some time experimenting around with QTextDocument.
> > > A small patch is attached which fixes the issues with the body tag (eg :
> > > background color).
> > > 
> > > It works fine with me, the only issue I'm facing is that it gives a high
> > > cpu usage, which leads to lag while scrolling fast.
> > > 
> > > I'm not getting the reason behind its high cpu usage.
> > 
> > Have you tried running it with callgrind option of valgrind + kcachegrind?
> 
> Till now I didn't know anything about profiling, I'm glad you brought it up.
> 
> I looked at the stats,
> 
>    - 'okularGenerator_epub.so' collectively costs only 0.01 (self), that's
>    also while loading the document.
>    - impact of QTextDocument in 'libQtGui.so' is around 0.03 (self)
>    - 'libokularcore.so' which contains TextDocumentUtils collectively costs
>    0.68
> 
> It doesn't appear to have a major impact.

When you say high cpu usage you mean that top gives you high numbers? Or you 
are saying high cpu usage because it lags?

Cheers,
  Albert

> 
> > Cheers,
> > 
> >   Albert
> >   
> > > If you want me to create a review request, I'll do it.
> > > 
> > > Cheers,
> > > Jaydeep
> > 
> > _______________________________________________
> > Okular-devel mailing list
> > Okular-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/okular-devel


More information about the Okular-devel mailing list