Bug 15174 - Excessive memory usage in as.dendrogram (+ fix)
Excessive memory usage in as.dendrogram (+ fix)
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Low-level
R 2.15.2
All All
: P5 enhancement
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-15 22:33 UTC by Daniel Müllner
Modified: 2013-04-18 12:34 UTC (History)
1 user (show)

See Also:


Attachments
Patched file "dendrogram.R" (27.71 KB, text/plain)
2013-01-15 22:35 UTC, Daniel Müllner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Müllner 2013-01-15 22:33:50 UTC
I was alerted by users of the "fastcluster" package that the "as.dendrogram" method in the "stats" package takes very long for larger input data. Upon source code inspection, I saw that "as.dendrogram" unnecessarily consumes too much memory (quadratic in the number of data points instead of linear). Attached is a fix that is minimally disruptive for the existing source code.
Comment 1 Daniel Müllner 2013-01-15 22:35:51 UTC
Created attachment 1405 [details]
Patched file "dendrogram.R"
Comment 2 Martin Maechler 2013-01-23 14:33:32 UTC
thank you;  I will take this up ..   Martin
Comment 3 Martin Maechler 2013-04-18 12:34:13 UTC
Now fixed, in both  "3.0.0 patched" and "R devel"