redhat-developer / redhat-developer/quarkus-ls

Improve performance of compute of Qute data model with binary

Open
#899 0 comments 0 reactions 1 assignee View on GitHub

@angelozerr is already working on this.

Since Jul 12, 2023.

performance qute
Dominant language
Java
Stars
50
Forks
18
Avg merge
22h 11m
Merged PRs (30d)
3

Description

Today when a Java source file is saved, it evicts the Java cache of Qute which stores information of Java source and binary classes (ex : Integer String have some methods) to use it with completion.

It means that each time you save a Java file source (in IJ it is not on saved but on change of Java file), it evict the cache from Java sources and binary classes and it compute again the data model from sources and binary (ex : it scans JAR to collect Qute renarde user tags, it collect again methods of String).

You can notice that by seeing LSP console which collect information about String, Collection, etc after a Java source change although the cache should not evict binary classes:

..

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (54)'
Params: {
  "className": "java.util.List",
  "projectUri": "quarkus-blast"
}

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (60)'
Params: {
  "className": "java.util.Collection",
  "projectUri": "quarkus-blast"
}

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (61)'
Params: {
  "className": "java.util.Collection",
  "projectUri": "quarkus-blast"
}

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (62)'
Params: {
  "className": "java.lang.Iterable",
  "projectUri": "quarkus-blast"
}


[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (63)'
Params: {
  "className": "java.lang.Iterable",
  "projectUri": "quarkus-blast"
}

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (64)'
Params: {
  "className": "java.util.Collection",
  "projectUri": "quarkus-blast"
}

[Trace - 01:45:50 PM] Received request 'qute/template/resolvedJavaType - (65)'
Params: {
  "className": "java.lang.Iterable",
  "projectUri": "quarkus-blast"
}

The evict cache must be improved to evict only data model of Java sources and not of binary when a Java file is saved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.