Git Product home page Git Product logo

Comments (15)

acumenrev avatar acumenrev commented on July 18, 2024 1

@Bunn here you are https://codebeautify.org/jsonviewer/cbe43b1d

from opensim.

Bunn avatar Bunn commented on July 18, 2024 1

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.

acumenrev avatar acumenrev commented on July 18, 2024 1

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.

Bunn avatar Bunn commented on July 18, 2024

@acumenrev does it stays like that forever?
I can't reproduce on my side:
screen shot 2018-11-19 at 14 57 30
screen shot 2018-11-19 at 14 58 17

What macOS version are you using?
Can you post the output of xcrun simctl list -j here?
thanks

from opensim.

acumenrev avatar acumenrev commented on July 18, 2024

@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.

Bunn avatar Bunn commented on July 18, 2024

@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.

Bunn avatar Bunn commented on July 18, 2024

@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.
screen shot 2018-11-21 at 22 16 07

Would it be possible for you to download the project (master branch) on your mac and profile it?

from opensim.

acumenrev avatar acumenrev commented on July 18, 2024

@Bunn sure, I think I can help

from opensim.

acumenrev avatar acumenrev commented on July 18, 2024

@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.

Bunn avatar Bunn commented on July 18, 2024

@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.

Bunn avatar Bunn commented on July 18, 2024

@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.

acumenrev avatar acumenrev commented on July 18, 2024

@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.

Bunn avatar Bunn commented on July 18, 2024

@acumenrev I'm happy that it got better, but what I don't understand yet are these multiple spikes
screen shot 2018-11-25 at 15 08 58

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 avatar acumenrev commented on July 18, 2024

@acumenrev I'm happy that it got better, but what I don't understand yet are these multiple spikes
screen shot 2018-11-25 at 15 08 58

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.

Bunn avatar Bunn commented on July 18, 2024

Fixed on release 0.4.2

from opensim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.