Drastic performance and memory footprint improvement on ruote engine startup when lots of flows are active.
Drastic performance and memory footprint improvement on ruote engine startup when lots of flows are active.

Solves two nasty problems:

    (1) Loading all the expressions from the database just to
        determine if anything needs scheduling (the common case for
        which appears to be "none").  Instead look at all active
        expressions (in DB), determine which classes respond_to
        reschedule, and only load those.

    (2) In doing (1), we drastically reduce the probability of "bloat"
        caused by other threads allocating memory *after* ruote has
        loaded all the expressions but *before* the GC has triggered
        to collect them (since they don't get used in the init
        process).

        These latent, unused objects *do* get destroyed when the GC
        triggers, but because they no longer neighbor the app's heap
        boundary, GC doesn't release the memory back to the system.

jmettraux/ruote-dm