After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691984 - Generated regression formulas spend ages in SUMSQ
Generated regression formulas spend ages in SUMSQ
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other All
: Normal normal
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-01-18 00:37 UTC by Morten Welinder
Modified: 2013-01-20 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tentative patch (2.98 KB, patch)
2013-01-18 01:58 UTC, Morten Welinder
none Details | Review

Description Morten Welinder 2013-01-18 00:37:07 UTC
The spreadsheet over in bug 691913 spends ages re-computing SUMSQ of some
area.

Either we need to be smarter with common subexpressions -- a long term
goal -- or else we should store that value somewhere on the sheet.
Comment 1 Morten Welinder 2013-01-18 00:43:39 UTC
It's the residual's norm.

    sqrt(sumsq('Regression New'!$E$21:$E$2797)

which, apart from being in one place, ought to use HYPOT.
Comment 2 Morten Welinder 2013-01-18 01:33:04 UTC
or maybe just sqrt(c13) -- we already have that sum of squares there.
Comment 3 Morten Welinder 2013-01-18 01:58:42 UTC
Created attachment 233711 [details] [review]
Tentative patch

This makes the generated sheets fast.
Comment 4 Andreas J. Guelzow 2013-01-20 07:42:23 UTC
This patch seems reasonable.
Comment 5 Morten Welinder 2013-01-20 17:51:05 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.


We can do 10000 data points without breaking a sweat now.  I don't foresee
any problems with even 1-2 orders of magnitude more data points than that.