groue / GRMustache.swift

Flexible Mustache templates for Swift
http://mustache.github.com/
MIT License
594 stars 155 forks source link

3.x and 4.x huge performance issue #60

Closed uroskrkic closed 5 years ago

uroskrkic commented 5 years ago

Hello, First of all, thank you for the library.

I used version 2.0.0 till today without any problem, when I wanted to update the whole development stack to Xcode 10.2 and Swift 5. So, I had to update to 4.x or eventually 3.x. Carthage update and build passed OK, but I noticed huge performance issue in call: template = try Template(URL: url). It takes up to 10-15 seconds in version 3.x and 4.x, in compare with less than a second in version 2.0.0.

This issue prevents me to update the whole project to Swift 5/Xcode 10.2.

Can you please check?

Thank you very much! Uros

fumito-ito commented 5 years ago

Hi @uroskrkic thank you for your feedback.

I try to reproduce this problem with a sample mustache file but cannot find any performance issues.

Can you show me any template to reproduce this problem ?

uroskrkic commented 5 years ago

Hi @fumito-ito ,

Thank you for the answer. In the attachment you will find 3 templates, actually, load the template tiers_garant_none_hospitals.html, as other two are included using partial including.

In version 2.0.0 this template loads in up to a second. 2.1.0 also works. But in any version after, 3.x, 4.x, the loading takes 10-15 seconds.

Thank you for the investigation. Uros templates.zip

groue commented 5 years ago

Hello @uroskrkic. This is fixed in #62.

uroskrkic commented 5 years ago

Hello @groue , thanks a lot! Cheers!

fumito-ito commented 5 years ago

version 4.0.1, 3.1.1 and 3.0.1 are released for Carthage and Cocoapods \w #62.