Skip to content

Template file parser is fragile and very inefficient #625

Closed

Description

@mavnn

But has unit tests. If someone wants to put the time into making it more efficient, feel free - I'm not going to get there for a while.

Activity

  1. forki commented on Feb 19, 2015

    @forki
    Member

    Could please give a little more details about what you think we should improve.

  2. mavnn commented on Feb 19, 2015

    @mavnn
    ContributorAuthor

    In TemplateFile.fs it currently rescans the whole file line by line with a RegEx each time it needs to get the value of a new property from the template file being parsed.

    Tokenizing the whole file into a dictionary in a single pass would knock a few hundred milliseconds off parsing each file.

    Tests for all of the basic functionality can be found here: https://github.com/fsprojects/Paket/blob/b4cf22385761628f4b1f230dcab2f06cf2ae10be/tests/Paket.Tests/TemplateFileParsing.fs

  3. mavnn commented on Feb 26, 2015

    @mavnn
    ContributorAuthor

    The current parser is not only inefficient but also excessively fragile (see #659 ). I'll have a look at a rewrite over the next few days.

  4. changed the title [-]Template file parser is very inefficient[/-] [+]Template file parser is fragile and very inefficient[/+] on Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions