Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • hive hive
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 23
    • Merge requests 23
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • hive
  • hivehive
  • Issues
  • #294

Closed
Open
Created May 10, 2022 by Eric Frias@efriasDeveloper

optimize custom_json_operation validation

When using --advanced-benchmark, I usually see the custom_json_operation::validate() call near the top of the list. I believe the majority of the time is spent checking that the json string is valid: https://gitlab.syncad.com/hive/hive/-/blob/9d6954c3ce460ca9d7ca3b629907bf2c9d05d9fa/libraries/protocol/hive_operations.cpp#L359 This validity checking works by deserializing the json into a variant, and verifying that the process doesn't throw and doesn't leave any unconsumed input. Building the variant is expensive, since it requires a lot of dynamic allocation. We could create a version of fc's recursive descent json parser that just checks validity but doesn't construct the variant, and I think that would be significantly faster.

The testing I did wasn't very rigorous, so verify my analysis before implementing a whole new parser.

Assignee
Assign to
Time tracking