Skip to content

Slow performance with versions 2.2+ and 3+ #4807

@rkyoku

Description

@rkyoku

Hi there!

I was using version 2.0.0 on an "old" project. Now that I am tidying it up, I switched to "@ stable", which is 3.9.0.

My export (roughly 600 rows and 80 columns) is now taking 2.08s when it took 0.7s with version 2.0.0 (which is roughly 3x slower).

I tried other versions, and 2.2.0 was the worst (5.5s, which is 8x slower). Version 5.4.0 takes 2.7s (roughly 4x slower).

I can keep a fast generation up until 2.1.14 (0.7s, same speed as 2.0.0). Any other major/minor version after that (2.2+ or 3+) is much slower (3x to 8x slower) (please note that I did not test every minor/revision individually, but I did test a few).

I did no other modifications to my code, just updated the lib.

I'll stick to 2.1.14 (btw the changelog says "## 2006-01-10 - 2.1.14" ==> "2006" instead of "2026") as 2.1 is still maintained ❤

I am using PHP 8.3 (plans to move to a more recent version soon) on Windows (if that matters).

I am not sure about the differences between all versions/branches, but I would love to get a more recent (minor/major) version and still keep the performance of 2.1.14.

Hope this helps! Thank you for the lib!

PS: calling fromArray only once, or one time for every row, gives the same performance. Calling setCellValue individually is a negligible 30ms longer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions