Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Conversation

@hendrikvanantwerpen
Copy link
Contributor

@hendrikvanantwerpen hendrikvanantwerpen commented Mar 21, 2023

This implements (de)serialization for partial paths and the path database.

  • Add PartialPath and Database types in the serde module.
  • Remove the old json module, which is now completely replaced by the new serde implementation.
  • Rename the json feature to visualization, which is more accurate now.

PR stack

@hendrikvanantwerpen hendrikvanantwerpen self-assigned this Mar 21, 2023
@hendrikvanantwerpen hendrikvanantwerpen marked this pull request as ready for review March 21, 2023 14:52
@hendrikvanantwerpen hendrikvanantwerpen requested a review from a team as a code owner March 21, 2023 14:52
@hendrikvanantwerpen hendrikvanantwerpen marked this pull request as draft March 21, 2023 19:41
@hendrikvanantwerpen hendrikvanantwerpen marked this pull request as ready for review March 21, 2023 19:41
@github-actions
Copy link

Performance Summary

Comparing base 8ebe511 with head 9251bc3 on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in stack-graphs, not on every commit.

Before
--------------------------------------------------------------------------------
Command:            base/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 base-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
9.127^                             ##                                         
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                   :      ::@#                                :::    :  
     |                   :      ::@#                                ::     :  
     |                   :      ::@#                                ::     :  
     |                  ::     :::@#       ::                     @@::   :::  
     |          ::      ::   @@:::@#      ::                     :@ ::  ::::  
     |         @:      :::   @ :::@#      ::  ::                ::@ ::  @:::  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   221.3
After
--------------------------------------------------------------------------------
Command:            head/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 head-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
5.127^                            #                                           
     |                          @:#                                ::     ::  
     |                   :      @:#                                ::     ::  
     |                   :      @:#                                ::     ::  
     |                   :      @:#                                ::     ::  
     |                   :      @:#                                ::     ::  
     |                  ::    ::@:#                              @:::    :::  
     |          @       ::    ::@:#       ::                     @:::   ::::  
     |          @       ::    ::@:#       ::                     @:::   ::::  
     |         @@      :::   :::@:#       ::                    :@:::   @:::  
     |        :@@:     :::   :::@:#      :::  :         :       :@:::  :@:::  
     |     :  :@@ :   @:::  ::::@:#   :::::: @:      @  :      ::@::::::@:::  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   222.3

@github-actions
Copy link

Performance Summary

Comparing base 8ebe511 with head 29c3cc5 on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in stack-graphs, not on every commit.

Before
--------------------------------------------------------------------------------
Command:            base/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 base-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
9.127^                             ##                                         
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                   :      ::@#                                :::    :  
     |                   :      ::@#                                ::     :  
     |                   :      ::@#                                ::     :  
     |                  ::     :::@#       ::                     @@::   :::  
     |          ::      ::   @@:::@#      ::                     :@ ::  ::::  
     |         @:      :::   @ :::@#      ::  ::                ::@ ::  @:::  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   221.3
After
--------------------------------------------------------------------------------
Command:            head/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 head-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
5.127^                            #                                           
     |                          ::#                                ::     ::  
     |                    @     ::#                                ::     ::  
     |                    @     ::#                                ::     ::  
     |                    @     ::#                                ::     ::  
     |                    @     ::#                                ::     ::  
     |                  ::@   ::::#                              :@::    :::  
     |                  : @   ::::#       :                      :@::    :::  
     |         @@       : @   ::::#       :                      :@::    :::  
     |         @       :: @  :::::#      ::   :                 ::@::   @:::  
     |     @  :@       :: @  :::::#      ::   :      @         :::@::  :@:::  
     |     @ ::@      ::: @  :::::#   @::::  ::   :  @  :      :::@::: :@:::: 
   0 +----------------------------------------------------------------------->Gi
     0                                                                   220.9

Copy link

@rewinfrey rewinfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, but had a question about how deserializing works for fields that are omitted when serialized.

@github-actions
Copy link

Performance Summary

Comparing base 8ebe511 with head b8a92af on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in stack-graphs, not on every commit.

Before
--------------------------------------------------------------------------------
Command:            base/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 base-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
9.127^                             ##                                         
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                             #                                          
     |                   :      ::@#                                :::    :  
     |                   :      ::@#                                ::     :  
     |                   :      ::@#                                ::     :  
     |                  ::     :::@#       ::                     @@::   :::  
     |          ::      ::   @@:::@#      ::                     :@ ::  ::::  
     |         @:      :::   @ :::@#      ::  ::                ::@ ::  @:::  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   221.3
After
--------------------------------------------------------------------------------
Command:            head/target/release/tree-sitter-stack-graphs-typescript analyze --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 head-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
9.112^                                                              #         
     |                                                              #         
     |                                                              #         
     |                                                              #         
     |                                                              #         
     |                                                              #         
     |                   :      ::@                              :@:#     @:  
     |                   :      ::@                              :@:#     @:  
     |                   :      ::@                              :@:#     @:  
     |          @      @::    ::::@      ::                     ::@:#   ::@:  
     |          @      @::    ::::@      ::                    :::@:#   ::@:  
     |        :@@     :@::  ::::::@     :::  :      :  :      ::::@:#  :::@:  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   226.5

@hendrikvanantwerpen hendrikvanantwerpen merged commit 54a8a94 into main Mar 29, 2023
@hendrikvanantwerpen hendrikvanantwerpen deleted the more-serde branch March 29, 2023 07:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request stack-graphs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants