-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
For the NDI-Marder project, profiling the element method plotEpochs uncovered some performance issue.
Profiling was done on session '412691d3730ea2a0_40cb949cfbed9eba', element: ntrode/dgn-1
Total time before making changes: 21.1 seconds
-
Repeated calls to
ndi.file.navigator/getepochfiles_number
Todo:- Cache the result in a map where epoch number is the key and the resulting file path(s) is the value.
-
Repeated calls the the database to check for ingested documents with the same query parameters.
NDI-matlab/+ndi/+file/navigator.m
Lines 477 to 480 in 5705f29
epoch_query = ndi.query('','isa','epochfiles_ingested') & ... ndi.query('','depends_on','filenavigator_id',ndi_filenavigator_obj.id()) & ... ndi.query('base.session_id','exact_string',ndi_filenavigator_obj.session.id()); d_ingested = ndi_filenavigator_obj.session.database_search(epoch_query);
This is called once per each epoch (107), resulting in total call time of ~3 seconds to mksqlite.
@stevevanhooser What about caching the result in a temporary cache with a timeout of e.g 1 minute? Other ideas? -
Repeated calls to abfloaf
There are 107 epochs, but 555 calls to read abc_header, totalling ~2 seconds.
Todo:- Can this be improved?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels