Comment 1 for bug 637758

Revision history for this message
Tim Penhey (thumper) wrote :

Robert and I talked through this for quite a while today.

CodeImportJobSet.getJobForMachine (lp.code.model.codeimportjob) is where the fun happens.

The heartbeat update is happening in
    machine.shouldLookForJob(worker_limit)

After the heartbeat, the only things are comparing a local db field with an enum, and comparing two integers. Neither of these would trigger the flush (we think). The next thing that happens is the CodeImportJob.selectOne call, which does trigger the flush. It is between the flush which sets the heartbeat, and the execution of the select that we are losing a lot of time.