Skip to content

perf: make CFG.serialize and loadFromBuffer linear - #29

Draft
chaen wants to merge 1 commit into
DIRACGrid:masterfrom
chaen:perf_cfg_serialize
Draft

chaen wants to merge 1 commit into
DIRACGrid:masterfrom
chaen:perf_cfg_serialize

Conversation

@chaen

@chaen chaen commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

serialize built its output with "+=" and listed all the sections and options for every entry; loadFromBuffer concatenated the whole value for each "+=" line. Both were quadratic in the number of entries in a list. Build the output with a join and buffer the consecutive appends instead.

Serializing the LHCb production CS goes from 230ms to 18ms.

This is called at every config change or sync call in the CS, but also for each jobs for its JDL and each pilot

@chaen
chaen marked this pull request as draft December 1, 2026 10:40
serialize built its output with "+=" and listed all the sections and
options for every entry; loadFromBuffer concatenated the whole value for
each "+=" line. Both were quadratic in the number of entries in a list.
Build the output with a join and buffer the consecutive appends instead.

Serializing the LHCb production CS goes from 230ms to 18ms.

This is called at every config change or sync call in the CS,
but also for each jobs for its JDL and each pilot
@chaen
chaen force-pushed the perf_cfg_serialize branch from b19ab5a to d3a0083 Compare December 1, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant