PHPOffice/PHPExcel — pull request #319 by pbosko (2014-02-13 14:52:29+00:00)
Title: Optimized applyFromArray performance by reducing cloning calls

applyFromArray() takes too much time to execute when applied on a large range of cells. When the same style is applied on cells with the same xfIndex a lot of time is spent in cloning existing style in order to apply new properties which are then used only for hash comparison.

My benchmarks show that this change improves applyFromArray speed for around 10-15% on large worksheets.

Also, this change cashes $this->getActiveSheet() in a local variable since its value is used in a few loops. This also cuts execution time for 1-2%.

I'm open for your suggestions if you want me to change something in this commit.