Ignore:
Timestamp:
2007-08-31T10:13:38+12:00 (15 years ago)
Author:
mdewsnip
Message:

Efficiency improvement: only get the filter to retrieve metadata in get_children() if some has been requested. Otherwise, the filter makes an unnecessary request to the GDBM database for each child node. This makes a HUGE difference in some cases (eg. the NLNZ Papers Past newspapers collection).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/recpt/OIDtools.cpp

    r13116 r14390  
    210210  request.filterName = "BrowseFilter";
    211211  request.filterLang = lang;
    212   request.filterResultOptions = FROID | FRmetadata;
     212  request.filterResultOptions = FROID;
     213
     214  // Efficiency improvement: only get the filter to retrieve metadata if some has been requested
     215  // Otherwise, the filter makes an unnecessary request to the GDBM database for each child node
     216  // By Michael Dewsnip, DL Consulting Ltd
     217  if (metadata.size() > 0)
     218  {
     219    request.filterResultOptions |= FRmetadata;
     220  }
     221
    213222  request.fields = metadata;
    214223  request.getParents = getParents;
Note: See TracChangeset for help on using the changeset viewer.