-
Notifications
You must be signed in to change notification settings - Fork 122
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
Check Data Directories on Request, Not Startup #28760
Conversation
2a72275
to
9107d05
Compare
ab55571
to
3da6c13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed using wondershaper
to slow connection to 10kb/s down and up. Adding a relative path to a network drive to the datasearch directories caused
from mantid.kernel import ConfigService
ConfigService.Instance()
to slow down from ~0.4s to ~1.5s.
With these changes the startup time of ConfigService
is now independent of the directories present.
@ConorMFinn Lots of build failures here, can you take a look |
@ConorMFinn Just one more failing test on Windows now. |
58353f0
to
1dcde7f
Compare
1dcde7f
to
eeabcd0
Compare
It's a legacy key that is no longer in active use.
If the key contains the string "director" it is assumed to point to a directory and if it its value is relatiove then the path is converted to an absolute path. This reduces the workload on startup while keeping the caching of important keys such as the datasearch paths and instrument directories for performance. Refs #12425
Config service now converts to an absolute path when storing values. Tests needed some changes to account for this. RE #28499
A lot of the ILL tests were using the appendDataSearchSubDir method in the setup functions. This was resulting in many directories being added to the config service as the tests ran. They have now been moved to the setUpClass functions or constructors so they are only added once. RE #28499
The changes to the ConfigService means that it can hold invalid paths until they are requested. This means that a check needed adding to ensure a path was valid before doing anything with it. RE #28499
eeabcd0
to
355dbe1
Compare
Description of work.
Changes the behaviour of the ConfigService so that data directories are checked when access is reqested, rather than on startup. The intention is to reduce the startup time of workbench when checking for network drives that may be very slow to access.
To test:
trickle
might be useful)Refs #28499
Reviewer
Please comment on the following (full description):
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.