Skip to content

Optimize parser performance #1373

@xingyong

Description

@xingyong

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    financeaccount.zip
    in the attachment,use the go tool pprof profile,will see parser.New() is too hot because of slice allocation.
    image
    Maybe, a object pool is proper.

  2. What did you expect to see?
    Reduce the overhead of make slice

  3. What did you see instead?
    parser.New() is too hot

  4. What version of TiDB SQL Parser are you using?
    master, all versions

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