DUNE-DAQ / DUNE-DAQ/trigger

Unnecessary use of SkipListAccessor in TPRequestHandler::periodic_data_transmission() ?

Open
#406 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
0
Forks
8
Avg merge
7h 21m
Merged PRs (30d)
3

Description

https://github.com/DUNE-DAQ/trigger/blob/6b62c0c62670ba00016e7ce5163e0c8cefe96f66/src/TPRequestHandler.cpp#L65

My understanding of SkipList node removal is that it is done lazily, removing nodes that have been marked for removal only after all SkipListAccessors, so creating accessors more than needed induces some overhead and may reduce some ability to get cleanup done.

I don't know if removing this will help much with the performance issue noted here https://github.com/DUNE-DAQ/datahandlinglibs/issues/62, but I don't think the accessor created here is really necessary: get_fragment_pieces() will create an accessor when it gets its lower_bound iterator, and so if we only need to get the best understanding of the timestamps, then we should be able to call front() and back() here (as is done in other datahandling places).

If others agree, we might try to remove this here, and then see if that helps (or at least doesn't hurt) the cleanup situation.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start in src/TPRequestHandler.cpp at periodic_data_transmission() and inspect how get_fragment_pieces() creates its SkipListAccessor through lower_bound. Compare that with the existing front() and back() usage in other datahandling locations. Done means determining whether the extra accessor can be removed without changing timestamp handling, then checking the datahandlinglibs issue for relevant performance effects.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.