Skip to content

Commit

Permalink
Set Precount option LoadEventNexus to true by default.
Browse files Browse the repository at this point in the history
It prevents the vectors from being over allocated by push_back and
means the deletion on Windows is then much quicker. The memory
fragmentation should also decrease as the allocation to the correct
size is done once per vector.

The performance tests will have to be monitored to check on the overall
effect on speed when combined with tcmalloc on linux. On windows, at least,
the loading is faster.
Refs #7780
  • Loading branch information
martyngigg committed Sep 9, 2013
1 parent a5042c9 commit b1803d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ void LoadEventNexus::init()
setPropertyGroup("SingleBankPixelsOnly", grp2);

declareProperty(
new PropertyWithValue<bool>("Precount", false, Direction::Input),
new PropertyWithValue<bool>("Precount", true, Direction::Input),
"Pre-count the number of events in each pixel before allocating memory (optional, default False). "
"This can significantly reduce memory use and memory fragmentation; it may also speed up loading.");

Expand Down

0 comments on commit b1803d6

Please sign in to comment.