#336: Increase timestamp speed ----------------------------------+----------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit trac | Version: Keywords: | ----------------------------------+----------------------------------------- The current time stamp mechanism in simfactory creates files with a scheme "timestamp-NUMBER", where NUMBER denotes the time. Looking for such files requires iterating over the directory.
Instead, we can use a fixed file name, and use the file creation time as time stamp. (We can additionally write the time stamp into the file, probably in a human readable form.) Accessing this time stamp is a single "stat" operation that should be quicker.
This method has the additional advantage that the time stamps always have the same file name.
#336: Increase timestamp speed -----------------------------------+---------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit trac | Version: Resolution: | Keywords: -----------------------------------+----------------------------------------
Comment (by knarf):
Using the file creation time as a timestamp is prone to errors when the local time on the client on the time on the fileserver (e.g. on nfs) are off a bit. The file creation time is set by the server.
Using a fixed filename with the time in the file would not have that problem.
#336: Increase timestamp speed -----------------------------------+---------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit trac | Version: Resolution: | Keywords: -----------------------------------+----------------------------------------
Comment (by eschnett):
One can also use touch (or os.utime) to set the file time to the client's time.
#336: Increase timestamp speed --------------------------+------------------------------------------------- Reporter: eschnett | Owner: mthomas Type: enhancement | Status: new Priority: minor | Milestone: Component: SimFactory | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by knarf):
* owner: => mthomas * component: EinsteinToolkit trac => SimFactory
trac@lists.einsteintoolkit.org