-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add auto-time-update flag to NIXpy file #385
Conversation
4311162
to
9c81fa7
Compare
I don't think the auto-update setting should be stored in the file. This should be a session option, much like the compression flag and the open mode. I also don't see the reason for having two methods, one for turning it off and one for on. Why not a property |
Failing test is due to mismatching File Format versions with NIX breaking a compatibility test. Will be fixed by #386. |
Refer to the issue #368
I added a flag for timestamp updating when the file is opened. 2 functions (time_auto_update_on() and time_auto_update_off()) are added for altering the flag after the file is opened.
The current policy is to update the time whenever a property of an Entity or File is changed and when the time_auto_update flag is True. I do not put the flag in the force_update_at() function because it is more flexible this way. Note that the update of metatdata will not change the update_at() time anyway.
The force_update_at() in creation is not affected.
As of the performance issue, the time used for changing the expansion_origin for data_array 100,000 times is:
EDITED:
always update (without a flag): around 45s
flag = True: around 45s (possibly slower for sections or property)
flag = False: around 20s
do not provide an auto_update possibility at all: around 20s (slightly less than flag = False)