Skip to content

412-Efficient influxdatabase connections#425

Draft
gopalangj wants to merge 5 commits intomainfrom
412-efficient-influxdatabase-connections
Draft

412-Efficient influxdatabase connections#425
gopalangj wants to merge 5 commits intomainfrom
412-efficient-influxdatabase-connections

Conversation

@gopalangj
Copy link
Copy Markdown
Collaborator

No description provided.

@gopalangj gopalangj linked an issue Feb 6, 2026 that may be closed by this pull request
@gopalangj
Copy link
Copy Markdown
Collaborator Author

@KobusVanRooyen, made an initial commit to this issue, where there is a slight improvement (~0.3s faster per call). I would still want to know if it could be sped up (exploratory), but I don't want to overdo it, so I would like to hear the requirements/what you think as well.

@KobusVanRooyen
Copy link
Copy Markdown
Collaborator

@KobusVanRooyen, made an initial commit to this issue, where there is a slight improvement (~0.3s faster per call). I would still want to know if it could be sped up (exploratory), but I don't want to overdo it, so I would like to hear the requirements/what you think as well.

@gopalangj 0.3s faster, nice. What is the ~percentage improvement? What was the original time [s] per call?


import rtctools.data.pi
from rtctools.data.storage import DataStore
from concurrent.futures import ThreadPoolExecutor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update your branch with main before doing further dev here

…zation/mesido into 412-efficient-influxdatabase-connections

Pulling main into the branch before making any changes
…ifferent threads trying to access same object information that could lead to code corruption
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the names unique (instead of having exactly the same name --->> workers_db_profile_reading=workers_db_profile_reading) or change the one to self._workers_db_profile_reading?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to be set at only 1 place. Currently this is set to 4 when retrieving the kwargs. So I think we should not set it to 1 here. What do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this not maybe be self._workers_db_profile_reading rather?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this code commented out?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed for reading from a file? So should this line not be deleted then?

None,
)
if not time_series_data:
with self._lock:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to discuss this lock

profile.endDate,
# Check if an object of the InfluxDBProfileManager is already present in a list. If so,
# re-use that object that was already created and been stored in the list.
time_series_data = next(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this code repeated in the code below?

@KobusVanRooyen
Copy link
Copy Markdown
Collaborator

KobusVanRooyen commented Apr 9, 2026

@gopalangj review completed.

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.

Efficient influxdatabase connections

2 participants