Bug 15174 - Excessive memory usage in as.dendrogram (+ fix)
Summary: Excessive memory usage in as.dendrogram (+ fix)
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 2.15.2
Hardware: All All
: P5 enhancement
Assignee: R-core
Depends on:
Reported: 2013-01-15 22:33 UTC by Daniel Müllner
Modified: 2015-12-14 13:46 UTC (History)
1 user (show)

See Also:

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

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"