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

perf: Unneeded file read and split in Cache.ts indexFile if no lists in file #959

Closed
AnnaKornfeldSimpson opened this issue Jul 31, 2022 · 2 comments · Fixed by #1004
Closed
Labels
scope: parsing markdown See also 'scope: global filter' scope: performance issues Issues with speed or responsiveness

Comments

@AnnaKornfeldSimpson
Copy link
Contributor

indexFile in Cache.ts link to code does a cached read of the file and then getTasksFromFileContent splits the entire contents by "\n" even if there are no list items in the file and the rest of the function is therefore a no-op. Opportunity for small optimization?

Moved from #697

@claremacrae
Copy link
Collaborator

I see what you mean.
What if there were no list items in a file, but there was a block quote or callout?

@AnnaKornfeldSimpson
Copy link
Contributor Author

AnnaKornfeldSimpson commented Aug 5, 2022

List items inside those still show up in listItems inside the metadataCache! Those list items might be within various elements in the sectionCache including "list" "callout" "blockquote" (and apparently from #688 whatever transclusions are called)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: parsing markdown See also 'scope: global filter' scope: performance issues Issues with speed or responsiveness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants