-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feat: follow link prefixed with file:// in the string content using documentLinkProvider #27
Conversation
@deribaucourt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a new commit that fixes vscode.search
client/src/documentLinkProvider.ts
Outdated
link.range.end.character | ||
) | ||
try { | ||
const [file] = await vscode.workspace.findFiles(link.value, undefined, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets called non stop and saturates all my CPUs to 100% for too long untill all links are generated. Make sure it's only called only when a "cltr+click" event is generated or the least amount of time possible. (opening busybox_*.bb)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also after I click a first time, it takes forever for the links to work again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it's just a performance issue in the for loops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your fix is very good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There still was a performance issue in your latest branch. I pushed a commit that greatly reduces the CPU consumption when opening recipes with many defined file:// links.
b63bf68
to
88f077a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I pushed a commit for performance
…re storing the symbols as they are only needed occasionally
Running findFiles() creates a ripgrep process for each URL which could saturate the CPU for tens of seconds. This patch optimizes the findRelatedFiles() function to only run findFiles() once and then filter the results.
82346e0
to
670bac7
Compare
Use the
documentLinkProvider
to provide the correct links in the string content.