Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dir(solver_session) is slow for the first time after connecting to Fluent #2356

Closed
mkundu1 opened this issue Jan 16, 2024 · 4 comments · Fixed by #3399
Closed

dir(solver_session) is slow for the first time after connecting to Fluent #2356

mkundu1 opened this issue Jan 16, 2024 · 4 comments · Fixed by #3399
Assignees
Labels
enhancement New feature or request. Feature work invariably requires testing-team involvement

Comments

@mkundu1
Copy link
Contributor

mkundu1 commented Jan 16, 2024

This is due to the one-time call to the settings API static-info, the issue is more prominent in the pyconsole autocompleter

@mkundu1 mkundu1 added the console integration Needed for PyFluent integratrion in console label Jan 16, 2024
@prmukherj prmukherj self-assigned this Jan 23, 2024
@prmukherj
Copy link
Collaborator

@mkundu1, you are already working on this in the server side, right?

@prmukherj prmukherj assigned mkundu1 and unassigned prmukherj Jan 23, 2024
@mkundu1
Copy link
Contributor Author

mkundu1 commented Jan 23, 2024

This has been resolved in Fluent/PyConsole, I'll remove the console integration tag.

For PyFluent, we start populating the dir in a background thread immediately after connection, will look into that later.

@mkundu1 mkundu1 removed the console integration Needed for PyFluent integratrion in console label Jan 23, 2024
@prmukherj prmukherj added the enhancement New feature or request. Feature work invariably requires testing-team involvement label Jan 23, 2024
@prmukherj prmukherj self-assigned this Jan 30, 2024
@prmukherj prmukherj linked a pull request Jan 30, 2024 that will close this issue
@mkundu1
Copy link
Contributor Author

mkundu1 commented Oct 16, 2024

Currently, first access to settings API is slow:

import time
import ansys.fluent.core as pyfluent
solver = pyfluent.launch_fluent()
start_time = time.time()
solver.settings
print("Elapsed time: ", time.time() - start_time)
start_time = time.time()
solver.settings
print("Elapsed time: ", time.time() - start_time)

Above code prints

Elapsed time:  4.425086736679077
Elapsed time:  0.0

@mkundu1
Copy link
Contributor Author

mkundu1 commented Oct 16, 2024

Most of the time is taken to retrieve the static-info (for hash comparison) - ~ 4 s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. Feature work invariably requires testing-team involvement
Projects
Status: In progress
2 participants