
WebOS hangs: Why?
Also, if one is running a few Homebrew apps and tries to install another one from the App Catalog, a “hang” of the OS will often occur, lasting 30 seconds or more sometimes.
Rod Whitby of rwhitby.net and WebOS-Internals.org found that the OS hang is due to a bad function call that makes the Pre find “the *complete* list of all *available* applications when determining whether there is room to install one known new application.” This unnecessary query is what takes all the time. So the OS isn’t actually hung, it’s just unnecessarily busy!
Meanwhile, back at the arbitrary app limit: What is the real limit of app install memory if the bad function call is bypassed? Whitby analyzed the OS and found the following:
…I’ve now webOS Doctored my Pre in the name of science, and have tested the limits of installing applications.
If you run “du -s /var/usr/palm/applications/*”, and add up all the numbers in the first column, then as soon as you hit the 62367 1K blocks limit of the addition of the sizes reported by that “du” command and the size of the app you with to install, you will get the dreaded “Sorry, Not Enough Memory” error from the Palm App Catalog application (and any other installer, like fileCoaster or PreLoad, which uses the palm appInstaller API). It doesn’t matter whether you have 192MB free in your /var partition, it will max out at just under 64MB of application usage.
Update #2: I have now created a Linux Application called “Fair Dinkum App Limit” (org.webosinternals.fairdinkum), which removes both the “hang” and the arbitrary application limit. You can find it in Preware. Just install it (no need to even run anything – if it is installed, it’s working), and you’re ready to install more applications than you can poke a stick at …
Fair Dinkum App Limit works by simply putting a couple of wrapper scripts in /usr/local/bin, which returns a size of zero when du is called, and returns the output of “ipkg -o /var list_installed” when “ipkg -o /var list” is called. In the future, the wrappers will be made much more sophisticated than they are right now to prevent operation outside of the specific cases where they need to fool LunaSysMgr, and to also include a safety buffer so that users do not fill the /var partition. This is a tactical response to a problem that people using homebrew applications are experiencing. Hopefully, Palm will provide the long term solution for limits on application installation in a release in the near future. …
Further information can be had on his blog:
http://www.rwhitby.net/blog/webos-internals/palm-pre-app-install-limits.html
(through the Tamsblog website)

I don’t use the Palm myself, but I like to follow developments in this space.
And this is very informative article indeed!
Good to see someone is keeping track of this stuff.