Ignore:
Timestamp:
09/02/11 19:05:11 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No (performance tuning)

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: a parameter "filename" is added to Scantable::summary. scantable.summary doesn't return a string anymore

Test Programs: sdlist unittest/ scantable.summary("summary.txt")

Put in Release Notes: Yes

Module(s): sdlist, asap.summary

Description:

scantable.summary is very slow for large data sets (in row number) often outputted
by modern telescopes. It takes > 1.5 hours to list OTF raster scan with 350,000 rows.

This was because, the methods accumulates the whole text string (~700,000 lines) and
returns it as a string. Once the summary string exceed several tens thousands lines,
elapse time increases non-linearly, may be because very massive output string starts
to overweigh the memory.

I updated scantable.summary so that it flushes the summary string more often to file/logger.
After the modification, scantable.summary could list the data mentioned above in ~ 7 minutes.
The side effect of it is that scantable.summary doesn't return summary string anymore.
(But people may not happy with sub-million lines of string anyway.)


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ScantableWrapper.h

    r2193 r2286  
    217217  Scantable* getPtr() {return &(*table_);}
    218218
    219   std::string summary() const {
    220     return table_->summary();
     219  //  std::string summary() const {
     220  //  return table_->summary();
     221  //  }
     222  void summary(const std::string& filename="") {
     223    return table_->summary(filename);
    221224  }
    222225
Note: See TracChangeset for help on using the changeset viewer.