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

Noticeable delay opening a markdown file (source) #8173

Closed
bpasero opened this issue Jun 27, 2016 · 13 comments
Closed

Noticeable delay opening a markdown file (source) #8173

bpasero opened this issue Jun 27, 2016 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 27, 2016

I am noticing a delay when I click on a markdown file until it opens. I think this is a regression from the new markdown extension but I am not sure what piece could cause it.

//cc @jrieken if you have clues

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues labels Jun 27, 2016
@jrieken
Copy link
Member

jrieken commented Jun 27, 2016

It's starting a process that encapsulated the rendering

@jrieken
Copy link
Member

jrieken commented Jun 27, 2016

A dupe of #7066

@bpasero
Copy link
Member Author

bpasero commented Jun 27, 2016

@jrieken I see this when opening the markdown file in source, not preview. I am aware of the delay when previewing.

@bpasero bpasero changed the title Noticeable delay opening a markdown file Noticeable delay opening a markdown file (source) Jun 27, 2016
@jrieken
Copy link
Member

jrieken commented Jun 27, 2016

hm... is the grammar we are using?

@jrieken
Copy link
Member

jrieken commented Jun 27, 2016

screen shot 2016-06-27 at 14 06 47

Holy moly - the parsing/loading the grammar is slow. Tho it only happens once/the first time. @aeschli @alexandrudima ideas how to seep that up? Is it better to use JSON instead of PLIST?

CPU-20160627T140746.cpuprofile.zip

@alexdima
Copy link
Member

alexdima commented Jun 28, 2016

This sounds like an opportunity for a great new plist-to-json node module that is streamlined to only handle plist. I'd love to write that :)

@alexdima alexdima self-assigned this Jun 28, 2016
@jrieken jrieken added this to the June 2016 milestone Jun 29, 2016
@jrieken jrieken self-assigned this Jun 29, 2016
@jrieken
Copy link
Member

jrieken commented Jun 29, 2016

Maybe we can use the native DOMParser for this (https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)

@alexdima
Copy link
Member

@jrieken vscode-textmate is a node module and should in theory not use browser API. We can, as always make it injectable with a different plist parser.

@alexdima
Copy link
Member

I am on the path of writing a plist parser.

before:
image

after:
image

@jrieken jrieken removed their assignment Jun 30, 2016
@jrieken
Copy link
Member

jrieken commented Jun 30, 2016

Tho, I'd still like to see how it compares to the DOMParser ;-)

@alexdima
Copy link
Member

@alexdima
Copy link
Member

To the verifier: please check that you can get the previous (slow) parser when setting the "hidden" preference editor.useExperimentalParser = false. I've added this to have a fallback in case my 10x faster parser has a bug, so we can switch back to the SAX based parser based on a setting. I will remove the setting after our confidence grows, by default the setting is on (use faster parser by default).

@alexdima alexdima added the verification-needed Verification of issue is requested label Jul 1, 2016
@bpasero
Copy link
Member Author

bpasero commented Jul 1, 2016

Works great in terms of performance 👍

@bpasero bpasero added the verified Verification succeeded label Jul 1, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants