tags:

views:

127

answers:

2

I'm developing an Eclipse plugin and am going to start presenting it in conferences and other venues, so people will install it.

One limitation of the plugin is that because of the amount of information it has to maintain to work, it needs more heap space than what is allocated to Eclipse by default. Eclipse runs with a miniscule max heap even on computers with tons of RAM, and many developers never bother to fix this, especially when running new versions.

If my plugin runs on a system with not enough heap space, it may slow Eclipse down.

What's the best strategy for addressing this? Is there some official way through Eclipse? Run time checks every time the plugin starts? etc.

+1  A: 

There seems to be now way to augment heap space at runtime (confirmed by this SO question)

So, a run time check at ACTIVE state of this OSGI bundle should be the only option (with a visible warning, a log entry in the Error view and an instant stop from this plugin)

VonC
+1  A: 

Check -Xmx setting when your plugin is first run, and propose to automatically increase it if it's too low. (Just write the changes directly to eclipse.ini.)

There is no other way as far as I know.

Andrey Tarantsov