Skip to content

Сompiling large queries takes a long time #402

@alex-tselikovsky

Description

@alex-tselikovsky

When generating a large query, performance drops significantly. Problem identified during research of Helper.cs (https://github.com/sqlkata/querybuilder/blob/master/QueryBuilder/Helper.cs) in the ‘ReplaceAll’ method on line 92 where string concatenation occurs.
image

Replacing it with the code below solves the problem.
.Aggregate(new StringBuilder(splitted.First()), (prev, right) => prev.Append(right))
Pull Request for this reason can be found at the link.
c54f509

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions