groue / GRMustache.swift

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

Fix slow template parsing in debug configuration #62

Closed groue closed 5 years ago

groue commented 5 years ago

This pull request fixes #60.

Template parsing was awfully slow, in Debug configuration. But not in Release configuration.

Why? I don't know. Something must has recently changed in the compiler. I could witness the slowness with Xcode 10.2.1.

Anyway, Instruments has shown where the slowness was. This PR fixes it, by replacing a local closure into a regular method.

groue commented 5 years ago

CC @pakko972: switch to branch fix-slowness until this PR is properly merged and released!