Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite template file parsing #660

Merged
merged 1 commit into from
Feb 26, 2015
Merged

Rewrite template file parsing #660

merged 1 commit into from
Feb 26, 2015

Conversation

mavnn
Copy link
Contributor

@mavnn mavnn commented Feb 26, 2015

Closes #625 and tests for #659

Before:

before

After:

after

It would be easier to smug about the two order of magnitude improvement if I hadn't written the original :)

@tpetricek
Copy link
Member

It runs so fast that the colors don't even start fading out :-)

@mavnn
Copy link
Contributor Author

mavnn commented Feb 26, 2015

@tpetricek ha :). I rebuilt before realising I wanted a benchmark!

@theimowski
Copy link
Member

Nice!

@@ -86,60 160,29 @@ module internal TemplateFile =
| ProjectInfo(core, optional) -> ProjectInfo(core, { optional with ReleaseNotes = Some releaseNotes })
{ templateFile with Contents = contents }

let private (!<) prefix lines =
Copy link
Member

Choose a reason for hiding this comment

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

yay one custom operator less. ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a new one to ensure balance in the force.

forki added a commit that referenced this pull request Feb 26, 2015
Rewrite template file parsing
@forki forki merged commit d8e5c54 into fsprojects:master Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template file parser is fragile and very inefficient
5 participants