Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The reason for WebKit is to be able to show a Google Maps frame to help people choose their location to get a more accurate sunrise/sunset. Not sure if that level of accuracy is necessary.

That said, the vast majority of OS X apps will link against the WebKit framework; not just Safari, but also Adium, Tweetbot, Mail.app, Growl, Notes, TextMate, iTunes, etc. It's pretty much guaranteed that it's in memory already, so there's no harm linking against it.

As for memory, ps reports about 64 MB of RSS; Activity Monitor reports 47.5 MB of memory used. Seems okay to me.

Which version of Mac OS are you using?



I'm using the latest Mountain Lion 10.8.5. On second though, I think I know what is going on.

First, linking with the webkit framework is not the problem, using the framework is. I was playing around with preferences and also location. As you say, this is when the Webkit frameworks kicks in, which might explain the memory blowup to 118MB.

Second, I seem to recall that modern OS allocators are reluctant to release memory back to the OS (pool) unless required (when available memory is low) hence the process appears to use more memory than what it actual might be using. When I just restart Flux without fiddling with preferences, memory usage stays at around 45MB. I still think this is way too high if you think about what the program is doing, but given the above, even if Activity Manager reports that Flux is using 45MB, it might not really use 45MB now, only at some point.

I remember I used Xcode's instruments to investigate my program and could then see that the real active memory used by the process was usually much less than what Activity Manager, top, and ps w/friends were reporting. So a large part of the memory the process is currently holding (45MB) might be released back to the OS if needed, I think. If someone has more details on this, please elaborate.

Edit: Flux is also running with 4 threads(!) which of course also adds to the process memory usage. Isn't a thread stack around 4-8 MB?

Also, Flux appears to use 0.1% CPU continuously which is sloppy since CPU usage can be remedied by putting (nano)sleep in the poll cycle to make it use zero CPU.


45MB! Why, that's very nearly 0.55% of the RAM I have!

Although on my Mavericks MBP, it's currently using 10.4MB (0.13%) of "Real Mem" according to Activity Monitory.


45 MB is ridiculous. Opening the App Store and browsing the front page only takes 100 or so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: