Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Cache date formatters during a single template render operation. #51

Merged
merged 2 commits into from
Apr 25, 2019

Conversation

MrMage
Copy link
Contributor

@MrMage MrMage commented Apr 1, 2019

Produces an extra 8% speedup in vapor/leaf#137 on top of vapor/core#199:

Screen Shot 2019-04-01 at 14 46 23

@tanner0101 tanner0101 added the enhancement New feature or request label Apr 12, 2019
@tanner0101 tanner0101 added this to In Progress in Vapor 3 via automation Apr 12, 2019
Copy link
Member

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be able to use a NIO.ThreadSpecificVariable here to get even better performance, but I think this is a good start at least.

@MrMage
Copy link
Contributor Author

MrMage commented Apr 15, 2019

Yeah, I think creating one date formatter per render and per date format should be fine.

@MrMage
Copy link
Contributor Author

MrMage commented Apr 17, 2019

Ist this ready to be merged?

Copy link
Member

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@tanner0101 tanner0101 merged commit cef9ad9 into vapor:master Apr 25, 2019
@penny-coin
Copy link

Hey @MrMage, you just merged a pull request, have a coin!

You now have 27 coins.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Vapor 3
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants