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/python_Scantable.cpp

    r2186 r2286  
    118118          boost::python::arg("unflag")=false) )
    119119    .def("_save",  &ScantableWrapper::makePersistent)
    120     .def("_summary",  &ScantableWrapper::summary)
     120    //.def("_summary",  &ScantableWrapper::summary)
     121    .def("_summary",  &ScantableWrapper::summary,
     122         (boost::python::arg("filename")=""))
    121123    .def("_list_header",  &ScantableWrapper::listHeader)
    122124    //.def("_getrestfreqs",  &ScantableWrapper::getRestFrequencies)
Note: See TracChangeset for help on using the changeset viewer.