-
Notifications
You must be signed in to change notification settings - Fork 13
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
Startup time and RAM usage differences for TR 4 #76
Comments
Conformed, also ion Linux. There's probably quite a bunch of smaller and bigger contributors to this problem and defintely a lot to improve over time. But I guess the biggest effect is that - seemingly - with current NetBeans, the cache dir is not set in the same way as with the Netbeans version that was used for developig thinking rock 3.7.0. With a properly set cache dir, the first launch of the application will be taking a similar time, but subsequent launches will be much quicker. I'll creat a PR to set the directory, which will hopefully be sufficient to close this ticket. Of course, with additional topics addressing cleanups and small improvements, we should keep performance (both time and memory) in mind and further finetune the application to be more efficient. |
…sequent starts of app The default_cachedir is set to DEFAULT_CACHDIR_ROOT, which will be in folder tr-4.0 within: - Mac: "${HOME}/Library/Caches/trgtd" - Linux: "${HOME}/.cache/trgtd/" Not sure where it is on windows.
…sequent starts of app The default_cachedir is set to DEFAULT_CACHDIR_ROOT, which will be in folder tr-4.0 within: - Mac: "${HOME}/Library/Caches/trgtd" - Linux: "${HOME}/.cache/trgtd/" Not sure where it is on windows.
Confirmed, also on Linux? Can you share exact numbers? In my case, MacOS 13.2, M1. I'll measure it later on RHEL. |
@RadekCap I suspect that you have installed thinking rock in a directory where your user has write permissions and therefore managed to create the cache directory. In my case I had installed into Can you grep your log file for "Cache Directory" and show the path chosen? |
The stats for me (Arclinux with kernel 6.1.8-arch1-1): 3.7.0
Three subsequent starts (starting with a deleted cache):
4.0.0.beta.1
With Cache Dir /opt (non-writable, before this PR)Three subsequent starts:
With Cache Dir ~/.cache/trgtd/tr-4.0 (writable - starting with a deleted cache)Three subsequent starts:
|
That's right. |
You might have the following directories and files scattered in your installation (home?) directory: With the PR, they would sit neatly in |
Yes, they're there :( |
@RadekCap Does the PR help in your case? |
yes, all the mess is in the cache folder. |
…hes of the application (#77) * fix(perf): [#76] Set default_cachedir to speed up subsequent starts of app The default_cachedir is set to DEFAULT_CACHDIR_ROOT, which will be in folder tr-4.0 within: - Mac: "${HOME}/Library/Caches/trgtd" - Linux: "${HOME}/.cache/trgtd/" Not sure where it is on windows. * aligns the default_userdir to use DEFAULT_USERDIR_ROOT - Mac: "${HOME}/Library/Application Support/trgtd/tr-4.0" - Linux: "${HOME}/.trgtd/tr-4.0"
I don't know if I can think this issue as fully closed. |
I created a separate ticket #78 to handle the memory part of this ticket. |
Still, a minute startup seems horrible to me. I do not have it, even with the cache removed. @ursjoss Do you have any idea why are my startup so fast? Yes, I still have trgtd folder directly in my home directory. |
Let's compare the size of the datafile... |
Do you think parsing is the bottleneck. It could be. 3 MB in my case. |
@ursjoss Do you see the same very slow startup from Netbeans as well? Netbeans has a profiler - https://netbeans.apache.org/kb/docs/java/profiler-intro.html |
My data file has a size of roughly 1.1M - containing 2897 lines. I started it three times with the
So the actual average startup times of this not very reliable small set of statistics would be around 20-25 seconds. When we profile the application in the context of ticket #78, we may find bottlenecks that also improves startup-time, who knows. |
On my work computer, the file has 462K - 319 lines.
My private laptop (see previous comment) has quite a few more years on it's back, it may simply be too slow to meet nowadays expectations. |
Just for info: my .trx data file is 1.8MB, and 7271 lines (but this parsing happens on every startup, so maybe you were talking about something else?) |
I understood @RadekCap that more than a few seconds startup time - even with caching in place - would be more than he expects. |
Hi,
on my computer (macbook pro 2017, 2.8 GHz, 16 GB, macOS 12.2) I've consistently this data (I report here timings related to a precise run, but the values are about the same every time):
TR 3.7.0 (JRE embedded):
at startup: 314.7 MB
after 1 hour idle: 315.0 MB
after 2 hour idle: 334.1 MB
maximum levels around 400/500MB in various conditions
TR 4.0.0 beta1 (JRE 17 Temurin)
at startup 557.4 MB
after 1 hour idle 572.0 MB
after 2 hours idle 627.4 MB
after 3 hours idle 672.5 MB
after 5 hours idle 698.3 MB
maximum levels around 900MB/1GB
The text was updated successfully, but these errors were encountered: