Comments (15)
@Bunn here you are https://codebeautify.org/jsonviewer/cbe43b1d
from opensim.
One thing I notice is that the app has this DirectoryWatcher
that forces a reload every time there's a change on the /CoreSimulator/Devices folder and subfolders. By any chance do you have any app that could be changing these folders and forcing a reload every 5 seconds or so?
I did increase the delay to avoid multiple reloads from 1 to 5 seconds when it's a folder notification change, and kept the 1 second for user refresh. This is on the develop branch, give it a try and let me know if it improves the situation.
Ideally we could solve this by lazy loading some information only when the user opens the menu, after all, there's no need to keep updating information if the app is not even visible, but I don't want to add a delay for when the user clicks the icon and sees the information. I'll investigate a better solution for this. Meanwhile, let me know if the fix improved and also your mac specs as I mentioned on the previous comment.
Thanks for your help @acumenrev :)
from opensim.
One thing I notice is that the app has this
DirectoryWatcher
that forces a reload every time there's a change on the /CoreSimulator/Devices folder and subfolders. By any chance do you have any app that could be changing these folders and forcing a reload every 5 seconds or so?
I did increase the delay to avoid multiple reloads from 1 to 5 seconds when it's a folder notification change, and kept the 1 second for user refresh. This is on the develop branch, give it a try and let me know if it improves the situation.Ideally we could solve this by lazy loading some information only when the user opens the menu, after all, there's no need to keep updating information if the app is not even visible, but I don't want to add a delay for when the user clicks the icon and sees the information. I'll investigate a better solution for this. Meanwhile, let me know if the fix improved and also your mac specs as I mentioned on the previous comment.
Thanks for your help @acumenrev :)
it's perfect now 🙌. The CPU usage often lower than 5%, sometimes it hits 50% but rarely. I truly appreciate it.
Actually, I don't have that kind of app that make changes in Simulator folders/subfolders every 5 seconds
from opensim.
@acumenrev does it stays like that forever?
I can't reproduce on my side:
What macOS version are you using?
Can you post the output of xcrun simctl list -j
here?
thanks
from opensim.
@Bunn yes, it always like that. More than 300. I am using the latest mac os version 10.14.1. What info do you need from me for running xcrun simctl list -j
?
from opensim.
@acumenrev I'd like to see the entire the json output because it's the only thing I can think of it's different from my situation, which works fine.
from opensim.
@acumenrev I tested with your json output and wasn't able to reproduce on my end as well. Only small CPU usage when opening the app or refreshing the simulator list, as expected.
Would it be possible for you to download the project (master branch) on your mac and profile it?
from opensim.
@Bunn sure, I think I can help
from opensim.
@Bunn hey, I attach my time profiler record, I think we have a problem with calcSize in Application. Don't know it happens to you or not?
OpenSimProfiler.trace.zip
from opensim.
@acumenrev interesting, this helps a lot. It doesn't happen on my end, I have several apps installed but the biggest one is 150mb, maybe this has something to do with it. OK, I'll see what I can to to improve the performance of the calcSize method. Thanks :)
from opensim.
@acumenrev Can you update and give it a try on the develop branch? I've made some changes to use du
instead of FileManager, and from my tests here it seems that the performance was improved. I just noticed that sometimes the app call the calcSize more times than it's necessary, I'm still taking a look at it, but let me know if the develop branch is working better for you. Thanks
from opensim.
@Bunn it's better than the previous one, but as I observe on Activity Monitor, it always consume more than 20% of CPU. Is that acceptable in your machine ?
OpenSimProfilerNov25.trace.zip
from opensim.
@acumenrev I'm happy that it got better, but what I don't understand yet are these multiple spikes
This is only supposed to happen when calculating the size when building the menu or clicking refresh. Did this happen only by opening the app or did you click refresh a bunch of times? Thanks
ps. What is the spec of your mac? would be interesting to know:
- CPU
- If it's SSD or HD
- macOS version.
from opensim.
@acumenrev I'm happy that it got better, but what I don't understand yet are these multiple spikes
This is only supposed to happen when calculating the size when building the menu or clicking refresh. Did this happen only by opening the app or did you click refresh a bunch of times? Thanks
ps. What is the spec of your mac? would be interesting to know:
- CPU
- If it's SSD or HD
- macOS version.
I just open the app and do nothing. My MBP 2015 Specs:
CPU: 2.5 Ghz Core i7
500 GB SSD
Mojave 10.14.1
from opensim.
Fixed on release 0.4.2
from opensim.
Related Issues (20)
- Add button to refresh simulators or refresh automatically after simulator reset.
- tvOS simulator support ~ HOT 1
- Latest version binary download crashes when launching with "unexpectedly found nil while unwrapping an Optional value" HOT 4
- make simulator not responding when using Xcode 9 beta 2 HOT 3
- 10.13 Beta Xcode8/9不工作 HOT 8
- ios11 模拟器的问题 HOT 1
- "Copy Sandbox Path to Pasteboard" not working HOT 1
- Can't see iOS 11 simulators in OpenSim HOT 27
- macOS Mojave & XCode10 Support HOT 1
- new build 0.4.0 not available through brew cask? HOT 2
- XCode 10.1 not supported -> isAvailable HOT 10
- OpenSim don't show anything HOT 5
- No Simulators found with Xcode 11 Beta HOT 3
- No simulators found on macOS Catalina beta (Xcode10/11) HOT 3
- hi, 能不能加个小功能呢? HOT 2
- XCode 11 HOT 7
- Feature request: notification/auto update when there is a new release
- Update Install with Homebrew Cask HOT 1
- groupContainer folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensim.