Comments (11)
Thanks for putting it through its paces. I'll check where the memory usage is coming from.
It shouldn't be the data blobs – these are stored on disk. Maybe just NSManagedObjectContext in-memory objects. What are you logging primarily: plain logs, network requests, or both?
Yes, there is currently no cap on the log files saved on a Mac during remote logging, and there probably should be and it should be configurable.
from pulsepro.
In this particular case, I believe it was logging both network requests (every few seconds) and a few general messages.
from pulsepro.
The good news is that I can reproduce it, and it runs great on iOS. The bad news is that I have no idea how to explain this much memory usage on macOS.
I created a sample project where I'm writing 100 small messages per second. Memory usage on iOS went from 50 MB to 51 MB after writing 4000 messages. On macOS, it went from 50 MB to 800 MB. In both cases, I'm on the list of messages that are constantly updating using the same mechanism (NSFetchedResultsController). I can't even being to comprehend how 4000 messages that take about 1 KB each can account for 750 MB. Investigating...
from pulsepro.
I'm glad you can reproduce it! I didn't mention that I was on an M1, if that matters. If you want another set of eyes on it, I'd be more than happy to take a look.
from pulsepro.
I'm still on Intel. Thanks, but I'm planning to keep it closed-source for now. A bit embarrassed by the code tbh.
I'm close to finding the culprit. It's not any of the data storage code. I ran the app in headless mode while still keeping all the ViewModels running and refreshing. After writing 3000 small messages, the memory usage increased from 39 MB to 40.5 MB. It looks like the UI (SwiftUI?) is the culprit (some layers are not released?).
from pulsepro.
OK; sounds good and the offer will stand if you want me to take a look. Feel free to contact me even if you don't intend on open sourcing it.
from pulsepro.
It was the toolbar. Looks like a common issue http://openradar.appspot.com/FB9453009. I'm trying to see how to mitigate it.
from pulsepro.
Yes, the root cause was the toolbar leaks. I stopped most of the bleeding. I'll release a new build later today when I finish testing. I also optimized CPU and disk usage.
Previously, the app was adding about 30 MB per minute just sitting idle and receiving messages ... not great to say the least.
Now, it's down to about 3 MB per minute when writing 1000 messages per minute. Pretty good, but I think I can improve it even further.
There are still a couple of toolbar leaks that you can trigger by actively using the app. These leaks are likely fixed in Monterey. I'm going to test the latest beta sometime later to confirm that.
from pulsepro.
Thanks! I am noticing that the app hangs after a little bit and then recovers. Hopefully it is the memory issue.
from pulsepro.
Performance is much better! I haven't noticed hangs and am running it all day long.
from pulsepro.
Great, I'm glad the main issues are resolved! I have a couple of ideas how to optimize it further.
from pulsepro.
Related Issues (20)
- Pulse Pro 2.0 (Beta 1) - Missing package product PulseCore HOT 1
- Crash on Pulse Pro 2.0 (Beta 2) HOT 2
- Pulse Pro 2.0 - Would be great if there was a way to see store info like you can on the iOS version. HOT 1
- Right-clicking the left sidebar after first launch (empty state) crashes the app HOT 1
- Remote Logging with devices HOT 5
- Unable to open .pulse logs HOT 3
- Bug: PulsePro doesn't seem to see all devices HOT 4
- Crash JSONTextView HOT 4
- NetworkInspectorHeaderViewModel has been put into Trash HOT 1
- Fails to build ... can't find Pulse master
- How to re-add Pulse dependency files? HOT 5
- Add new way app delivery method: Brew? HOT 5
- Feature Request - jsonViewer if the message contains json HOT 1
- Search show only found results HOT 1
- Recurrent crashes on Pulse Pro when locally opening exported file .pulse but not when watching live logs on device HOT 7
- [Feature Request] Automatically scroll down to the bottom when new messages arrive
- Licence mismatch in file header comments HOT 2
- Filtering by Level or Label doesn't work HOT 2
- Why deleted the source code?
- Unable to open App. Provision profile is invalid HOT 3
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 pulsepro.