Version: 1.8.0 (using KDE 4.3.4) OS: Linux Installed from: Compiled From Sources Bug report follows from kst user: ================= I'm running Kst 1.8.0 on Fedora 10. I sometimes deal with data files with 200+ fields and 70,000+ samples per field. I setup all of the plots through KstScript and everything goes pretty quickly until I start appending curves to the plot's CurveCollection. The first few curves get added quickly, but adding each additional curve takes exponentially longer -- like 30 minutes for a data file with 300 fields. Most of the curves get added to one plot. Looking at the code in kst2dplot.cpp, it appears that the whole plot and all of its curves get completely repainted every time a new curve is added. If this is the case, one solution would be to make it possible to add an array of curves to a plot at once. That way, all of the painting and range calculations only need to be done once. A more hacky workaround would be to add a KstScript function to suspend and resume painting. Painting could be suspended before adding curves and then resumed again afterwards. Another alternative would be to schedule a repaint a second or two in the future when a curve is added. The repaint would get rescheduled every time a curve is added. So as long as you're adding curves rapidly, the painting gets delayed.
SVN commit 1081190 by arwalker: CCBUG:224516 first draft. Add enableUpdates property on the Kst js-object. This will allow prevention of automatic repaints with each curve addition. When all curves are added call Kst.enableUpdates=true M +5 -5 extensions/js/bind_arrow.cpp M +19 -19 extensions/js/bind_axis.cpp M +3 -3 extensions/js/bind_axislabel.cpp M +3 -3 extensions/js/bind_axisticklabel.cpp M +4 -4 extensions/js/bind_borderedviewobject.cpp M +5 -5 extensions/js/bind_box.cpp M +8 -8 extensions/js/bind_curvecollection.cpp M +3 -3 extensions/js/bind_ellipse.cpp M +4 -4 extensions/js/bind_group.cpp M +30 -0 extensions/js/bind_kst.cpp M +15 -0 extensions/js/bind_kst.h M +8 -8 extensions/js/bind_label.cpp M +9 -9 extensions/js/bind_legend.cpp M +6 -6 extensions/js/bind_line.cpp M +3 -3 extensions/js/bind_picture.cpp M +2 -2 extensions/js/bind_plot.cpp M +5 -5 extensions/js/bind_plotlabel.cpp M +3 -3 extensions/js/bind_timeinterpretation.cpp M +8 -8 extensions/js/bind_viewobject.cpp M +5 -5 extensions/js/bind_viewobjectcollection.cpp M +22 -9 libkstapp/kst.cpp M +5 -0 libkstapp/kst.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1081190
The previous message should read enableRepaints in place of enableUpdates. Some example code: . Kst.enableRepaints=false . <add many curves to a plot> . Kst.enableRepaints=true .
Changing the Kst.enableRepaints property doesn't seem to work. From the JS console: kst> Kst.enableRepaints=false false kst> Kst.enableRepaints true Painting also still occurs.
SVN commit 1081640 by arwalker: CCBUG:224516 add support for setting properties on the Kst object M +18 -0 bind_kst.cpp M +1 -0 bind_kst.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1081640
Hi Michael, My apologies for that. The Kst object didn't have underlying support for setting the values of the properties, as they were previosuly all read-only. I've added the necessary support and checked-in the change. I'll mark the bug as fixed once we've done some testing at this end. Thanks, Andrew ----- Original Message ----- From: "Michael Vincent" <bug.zilla.vynce@neverbox.com> To: <arwalker@sumusltd.com> Sent: Thursday, January 28, 2010 1:20 PM Subject: [Bug 224516] Adding curves through js is slow > https://bugs.kde.org/show_bug.cgi?id=224516 > > > Michael Vincent <bug.zilla.vynce@neverbox.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| > |bug.zilla.vynce@neverbox.co > | |m > > > > > --- Comment #3 from Michael Vincent <bug zilla vynce neverbox com> > 2010-01-28 22:20:34 --- > Changing the Kst.enableRepaints property doesn't seem to work. > > From the JS console: > kst> Kst.enableRepaints=false > false > kst> Kst.enableRepaints > true > > Painting also still occurs. > > -- > Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You reported the bug. >
Testing shows that things are now working as expected.
It works now. Thanks!