-
Notifications
You must be signed in to change notification settings - Fork 26
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
Possible speedup for requesting sie file #1555
Comments
alexlin0
added a commit
that referenced
this issue
Sep 13, 2023
When creating the sie file there is a marker string that Trick searches for where it writes the run time allocated memory. The loop that was searching for the string was iterating one character at a time and reading from file each time. This was slow. Changed the loop to read 1Mb into memory at a time and search for the string. Handled the case where the marker string could straddle the 1Mb boundary by copying a small portion of the previous part of the file for the next search. For my one test point sie file generation dropped from 90+ seconds to 3.5 seconds.
alexlin0
added a commit
that referenced
this issue
Sep 14, 2023
Math was wrong on some offset values. Fixed them now.
alexlin0
added a commit
that referenced
this issue
Sep 14, 2023
The mac won't allow me to declare a "char buff[1000001];". It compiles but throws an exception when run. Changed it to "char *buff = new char[1000001];"
alexlin0
added a commit
that referenced
this issue
Sep 15, 2023
* Possible speedup for requesting sie file #1555 When creating the sie file there is a marker string that Trick searches for where it writes the run time allocated memory. The loop that was searching for the string was iterating one character at a time and reading from file each time. This was slow. Changed the loop to read 1Mb into memory at a time and search for the string. Handled the case where the marker string could straddle the 1Mb boundary by copying a small portion of the previous part of the file for the next search. For my one test point sie file generation dropped from 90+ seconds to 3.5 seconds. * Possible speedup for requesting sie file #1555 Math was wrong on some offset values. Fixed them now. * Possible speedup for requesting sie file #1555 The mac won't allow me to declare a "char buff[1000001];". It compiles but throws an exception when run. Changed it to "char *buff = new char[1000001];"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When variable server clients request the S_sie.resource file, the sim first writes all of the current memory allocations out to file to include as part of the request. For large sims this operation can take a while, like minutes to complete. It may be possible to speed this up. The target funciton is Trick::Sie::runtime_objects_print in Sie.cpp. There is some evidence that using a "FILE *" type would be faster than the "std::fstream". Perhaps reducing the number of print statements could speed up the process, or even writing the text to a large memory block, 1Mb or larger, then writing the block to file could speed things up.
The text was updated successfully, but these errors were encountered: