Closed GoogleCodeExporter closed 9 years ago
Honestly, I haven't actually run ExpoSong with more than 50 songs before, so we
really need to double check that everything works fine with a large database.
The presentation files are only loaded once (see application.build_pres_list).
My
guess is the filtering could cause a problem. Is it slow when you initially
type a
text to filter?
Try messing around with preslist._on_pres_edit to see if it might improve the
speed
(look specifically at `self.get_model().refresh_model()`).
Off-topic: Have you written a conversion script to OpenLyrics, or are you using
0.6.1
for this?
Original comment by bradleelandis
on 10 Apr 2010 at 3:15
Thanks for your tips.
You were right, the line 'self.get_model().refresh_model()' is responsible for
the
slowness.
I found no way to update a single row with the gtk.CellRendererText.
Is there a reason why you took the gtk.CellRendererText instead of
gtk.TreeModel?
For the TreeModel I found this:
http://faq.pygtk.org/index.py?req=show&file=faq13.021.htp and I hope that this
would
not be so slow as refreshing the whole model.
I'm using 0.6.1
Original comment by s.mehrbrodt
on 11 Apr 2010 at 5:36
Give this a shot. It manually modifies the title. It should at least make it
faster.
I might should use `TreeViewColumn.set_cell_data_func` and have it
automatically set
the value.
Original comment by bradleelandis
on 12 Apr 2010 at 3:01
Attachments:
Now it is faster, but it doesn't work when the list is filtered, seems to use
the
wrong model:
Traceback (most recent call last):
File "bin/../share/exposong/lib/exposong/preslist.py", line 145, in _on_pres_edit
model.set_value(itr, 1, field.title)
AttributeError: 'gtk.TreeModelFilter' object has no attribute 'set_value'
Original comment by s.mehrbrodt
on 12 Apr 2010 at 6:03
I didn't test this, so I hope it doesn't totally mess things up. It's the same
idea
from preslist.get_mode(). The only problem I see depends on how the iterator
works, but
I think from my past experience that iterator always points to the same item,
even if
you delete, or filter out items before and after the one that itr points to.
Original comment by bradleelandis
on 12 Apr 2010 at 6:22
Attachments:
I tried the same before :)
But it doesn't work:
bin/../share/exposong/lib/exposong/preslist.py:148: GtkWarning:
gtk_list_store_set_value: assertion `VALID_ITER (iter, list_store)' failed
model.get_model().set_value(itr, 1, field.title)
Original comment by s.mehrbrodt
on 12 Apr 2010 at 6:34
Fixed with r331. Let me know if you run into more issues, but it works in my
tests. I
did only have 15 songs though.
Original comment by bradleelandis
on 14 Apr 2010 at 1:29
Original issue reported on code.google.com by
s.mehrbrodt
on 8 Apr 2010 at 8:54