potential speed-up in reading ROOT files

Open
#1,722 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
performance

Research direction

Start by locating the current GetEntry calls and the handling of save_position, then compare their usage with ROOT's TEntryList documentation linked in the issue. Determine whether sequential processing permits Next or requires choosing between Next and GetEntry based on access patterns; done means the reading path is measurably faster without changing its behavior.

Written by the indexing model from the issue text.

Description

https://root.cern.ch/doc/master/TEntryList_8cxx_source.html says

 __GetEntry(n)__ - returns the n-th entry number
- __Next__()      - returns next entry number. Note, that this function is
                much faster than GetEntry, and it's called when GetEntry() is called
                for 2 or more indices in a row.

We're using GetEntry at the moment. There's maybe an easy work-around to have a method that check if we should call Next or GetEntry depending on the number (seems a bit silly that ROOT wouldn't do that).

The alternative might be to just call Next, as we will always process in sequence (except when using the save_position).

Dominant language
C++
Stars
160
Forks
113
Avg merge
12d 15h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UCL/STIR

All issues in UCL/STIR

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.