Enhanced gantt rendering algorithm: more accurate and slightly more efficient