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

[WIP] Avoid intermediate values when serializing and deserializing proto3 JSON #670

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from

Commits on Jun 2, 2022

  1. Avoid intermediate values when serializing proto3 JSON

    This uses jsontool library to avoid allocating intermediate values when
    generating proto3 JSON strings.
    
    Note that the code is not tested for correctness yet, and well-known
    types are not supported.
    
    AOT results:
    
    Before:
    
        ToProto3JsonString(RunTime): 40474.54 us.
        ToProto3JsonString(RunTime): 40340.84 us.
        ToProto3JsonString(RunTime): 40403.9 us.
    
    After:
    
        ToProto3JsonString(RunTime): 26978.906666666666 us.
        ToProto3JsonString(RunTime): 26891.893333333333 us.
        ToProto3JsonString(RunTime): 26945.04 us.
    
    Diff: -33%
    
    JS results:
    
    Before:
    
        ToProto3JsonString(RunTime): 71551.72413793103 us.
        ToProto3JsonString(RunTime): 72103.44827586207 us.
        ToProto3JsonString(RunTime): 72035.71428571429 us.
    
    After:
    
        ToProto3JsonString(RunTime): 45422.22222222222 us.
        ToProto3JsonString(RunTime): 45266.666666666664 us.
        ToProto3JsonString(RunTime): 46813.95348837209 us.
    
    Diff: -36%
    osa1 committed Jun 2, 2022
    Configuration menu
    Copy the full SHA
    84c6bc8 View commit details
    Browse the repository at this point in the history
  2. Fix formatting

    osa1 committed Jun 2, 2022
    Configuration menu
    Copy the full SHA
    662efa9 View commit details
    Browse the repository at this point in the history
  3. Fix reserved names test

    osa1 committed Jun 2, 2022
    Configuration menu
    Copy the full SHA
    81ddd0c View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2022

  1. Avoid intermediate JSON objects when merging proto3 JSON messages

    AOT before:
    
    FromProto3JsonString(RunTime): 33019.11475409836 us.
    FromProto3JsonString(RunTime): 32874.45901639344 us.
    FromProto3JsonString(RunTime): 33174.40983606558 us.
    
    AOT after:
    
    FromProto3JsonString(RunTime): 22567.494382022473 us.
    FromProto3JsonString(RunTime): 22654.606741573032 us.
    FromProto3JsonString(RunTime): 22849.06818181818 us.
    
    Diff: -31%
    
    JS before:
    
    FromProto3JsonString(RunTime): 34568.96551724138 us.
    FromProto3JsonString(RunTime): 35368.42105263158 us.
    FromProto3JsonString(RunTime): 35892.857142857145 us.
    
    JS after:
    
    FromProto3JsonString(RunTime): 85875 us.
    FromProto3JsonString(RunTime): 83916.66666666667 us.
    FromProto3JsonString(RunTime): 82880 us.
    
    Diff: +130%
    osa1 committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    3594c5d View commit details
    Browse the repository at this point in the history
  2. Update reserved names

    osa1 committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    a64b2f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Configuration menu
    Copy the full SHA
    a549b57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8ef37d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fa4d2ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f155f11 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    24bffd5 View commit details
    Browse the repository at this point in the history
  6. Refactoring

    osa1 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    7c92089 View commit details
    Browse the repository at this point in the history
  7. Stubs for well-known types

    osa1 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    6fa98c8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    38079b0 View commit details
    Browse the repository at this point in the history
  9. Rename jsonWriter -> jsonSink

    osa1 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    a737185 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Start updating well-known types

    osa1 committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    9b62b5d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d44a919 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    78d495e View commit details
    Browse the repository at this point in the history
  4. Update reserved names

    osa1 committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    c8895c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e6bee93 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    add7cce View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Fix a few bugs

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    513d01e View commit details
    Browse the repository at this point in the history
  2. Fix a bug

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    951a2c9 View commit details
    Browse the repository at this point in the history
  3. Update two tests

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    00003ce View commit details
    Browse the repository at this point in the history
  4. Fix a few tests

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    48804f1 View commit details
    Browse the repository at this point in the history
  5. More bugs

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    a5a3f98 View commit details
    Browse the repository at this point in the history
  6. Fix int bounds checks

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    dd8cb85 View commit details
    Browse the repository at this point in the history
  7. A few fixups

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    4d43c95 View commit details
    Browse the repository at this point in the history
  8. Fix bugs, update tests

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    6fe0731 View commit details
    Browse the repository at this point in the history
  9. Bump jsontool

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    333f16c View commit details
    Browse the repository at this point in the history
  10. Remove unused def

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    a890105 View commit details
    Browse the repository at this point in the history
  11. Fix error messages

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    eaa0d35 View commit details
    Browse the repository at this point in the history
  12. Disable a test for now

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    14bffa2 View commit details
    Browse the repository at this point in the history
  13. Fix TODOs

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    0e28eb3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    02a9960 View commit details
    Browse the repository at this point in the history
  15. Renaming, docs

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    7899d1f View commit details
    Browse the repository at this point in the history
  16. More docs

    osa1 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    ee3cf27 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Bump jsontool

    osa1 committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    617c30c View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. Configuration menu
    Copy the full SHA
    712cae7 View commit details
    Browse the repository at this point in the history