Lew <> wrote:
> Andreas Leitgeb wrote:
>> PS: I once had a task where some explicit System.gc() really helped.
> Presumably because the combination of code idioms and GC strategies
> wasn't optimized.
Genetic algorithm surely means something to you.
High and low tide, too, most likely.
In order to push the envelope just slightly, I had set heap size
to a bit more than physical memory size (to not have the program
bomb out for the rare high peaks) but otherwise make sure that
memory consumption stays well below the maximum most of the time.
Doing System.gc() on the low-tide-points just simply did help
achieve that goal. Other tricks may as well have existed,
they just didn't occur to me.
>> I don't know why it is so vaguely defined ("suggests", rather
>> than "requests" a best effort...), but it did appear to work
>> well, anyway.
> It appeared to work because you used a JVM implementation that
> honored it and you didn't run it with the switch that ignores those calls.
> Had either of those conditions not pertained, youd've had to actually fix
> the problem.
Indeed, like unsetting that (mindless) switch or changing to a
JVM-implementation that does honor the "suggestions"
PS: is "youd've" any common? It was easy to understand, but I'd never
before seen it written that way. Most of Google's first-page hits
seem to be discussions about how legal something like "you'd've"
would be. Only hit for "youd've" is in a youtube-video title.