[Interest] QTreeView expand/expandAll performance

William Hallatt goblincoding at gmail.com
Tue Sep 30 08:43:40 CEST 2014


Hi Paul,

I first updated my data() method as suggested and after having a look at my
profiling results and, although there was a marked improvement, the effect
of a first expansion of any node with a large number of children on the GUI
was still ridiculous.  Grasping at straws, I decided to remove "lazy
loading" completely in order to see what the result would be when creating
my entire item hierarchy in one go.  The odd thing is that this had a
massive positive impact on the GUI's responsiveness (the only problem with
this approach is that there is now a slight delay when setting a large
model on the view, but it is as nothing when compared to the total meltdown
experienced previously...I am dealing with this by simply sticking a "Don't
stress, we're loading" message over the view...not perfect, but it is
enough for now).

I expect that the reason for the lazy loading failure is either that (1) I
implemented something odd somewhere, or (2) that lazy loading does not work
well with hierarchical models and views.  Since I  expect it is probably
(1), I would dearly love to see an example of a lazy loading implementation
for a hierarchical model/view that works so if anybody has one, I'd
appreciate it immensely!

Regards,
William.



On 29 September 2014 14:50, Paul Miller <paul at fxtech.com> wrote:

> On 9/27/2014 12:34 AM, William Hallatt wrote:
> > Sorry for the spam, but now that I'm looking at the profiler's output
> > again in light of Paul and Marian's input, I think I've identified where
> > I'll need to make my improvements.
> >
> > Thanks again for the help!
>
> Could you let us know where the issue was?
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140930/8f1bacec/attachment.html>


More information about the Interest mailing list