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

Remove unnecessary completion item data field #2646

Merged
merged 1 commit into from
May 10, 2023

Conversation

jdneo
Copy link
Contributor

@jdneo jdneo commented May 10, 2023

  • The signature information is not needed to store in the completion item data field. It can be retrieved from the proposal that stored in the completion response cache.

fix #2645
fix #2638

Complete after a string variable. the response data can be reduced from 83.7KB to 70.4KB

- The signature information is not needed to store in the completion item
  data field. It can be retrieved from the proposal that stored in the
  completion response cache.

Signed-off-by: Sheng Chen <sheche@microsoft.com>
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

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

Confirmed the payload reduction. A ~20% reduction in the size of a completion item that's a method/type proposal.

$ ls -sh old.txt new.txt 
68K new.txt  84K old.txt
--- old.txt 2023-05-10 14:59:50.490531788 -0400
+++ new.txt 2023-05-10 15:08:33.875918949 -0400
@@ -1,4 +1,4 @@
-[Trace - 14:59:14] Received response 'textDocument/completion - (41)' in 269ms.
+[Trace - 15:08:05] Received response 'textDocument/completion - (40)' in 339ms.
 Result: {
     "isIncomplete": false,
     "items": [
@@ -110,9 +110,6 @@
                 ]
             },
             "data": {
-                "decl_signature": "Lorg.example.Main;",
-                "signature": "(Ljava.lang.String;Ljava.lang.Class<*>;)Ljava.lang.Object;",
-                "name": "deserializeData",
                 "pid": "4",
                 "rid": "0"
             }
@@ -137,9 +134,6 @@
                 ]
             },
             "data": {
-                "decl_signature": "Lorg.example.Main;",
-                "signature": "([Ljava.lang.String;)V",
-                "name": "main",
                 "pid": "5",
                 "rid": "0"
             }
@@ -164,7 +158,6 @@
                 ]
             },
             "data": {
-                "decl_signature": "Lorg.example.Main;",
                 "pid": "6",
                 "rid": "0"
             }

@rgrunber rgrunber merged commit b3202c1 into eclipse-jdtls:master May 10, 2023
4 checks passed
@jdneo jdneo added this to the End May 2023 milestone May 11, 2023
@jdneo jdneo deleted the cs/resolve-improve branch May 11, 2023 00:37
@rgrunber rgrunber removed this from the End May 2023 milestone May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants