VcsEventWidget + Slow Mercurial Log

Niko Sams niko.sams at gmail.com
Fri Jan 15 11:25:37 UTC 2010


On Fri, Jan 15, 2010 at 11:48, Fabian Wiesel
<fabian.wiesel at googlemail.com> wrote:
> Hi,
>
> I have a small problem with how VcsEventWidget and Mercurial log interact
> and I am not sure how to proceed.
> It takes quite some time to get all the events and so the VcsEventWidget is
> stays empty.
>
> One way to solve it, is in the plugin itself, by parsing the log
> incrementally and
> to emit resultsReady() as I go.  Easy done. But I am not quite sure, how the
> GUI will then behave.
> Also the process still takes quite some time for reading a lot of data
> people may not be interested in.
> For the project I work on, that is about 30secs for about 5000 changesets.
> How long would it take for a Mozilla-dev with almost 40k changesets? It
> seems to scale badly.
>
> The other way to solve it would be in the VcsEventWidget (or the
> VcsEventModel):
> Instead of loading the full log, one only loads the necessary parts.
> Maybe the first 100 and the last one  and make a guesstimate about
> VcsItemEventModel::rowCount().
> When GUI requests other parts of the VcsEventModel, one tries to find the
> correct blocks.
> Similar problem, how does the GUI behave, if I change the rowCount() on the
> fly?
> More work, quite a fair amount of more code, but definitely more scalable.
> But you could say it is a work-around.
>
> Did I miss another possibility completely?
You can let the user decide what range he needs: show the last 100 by default
and add a button to get more. (or a way to enter a specific range)
kdesvn does that.
That's the easiest to implement I guess, but not so good to work with.

Niko




More information about the KDevelop-devel mailing list