-
-
Notifications
You must be signed in to change notification settings - Fork 129
perf: use ValueListBuilder
for PrivatePrintLeadingTrivia
#1532
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
base: main
Are you sure you want to change the base?
Conversation
I'm wondering if keeping it is worth it to try to keep Besides this, multiline raw strings also make use of In theory I think CompilationUnit could set things to |
7c5ef07
to
75b2804
Compare
eeaf247
to
9e9ad83
Compare
75b2804
to
e752f9f
Compare
1e4d1db
to
ba91032
Compare
ba91032
to
e752f9f
Compare
6f2128d
to
a807b39
Compare
Sorry about taking forever, getting back into programming now. Did csharpier remove caching recently? CSharpier takes up to 10 seconds to run on this project when it used to take 400ms. Edit: I've briefly looked at #1588, how does waiting on gitignore cause this degradation? BenchmarksNote that timing is inaccurate, small memory improvements. Current
Changes
|
a807b39
to
aa8262e
Compare
One argument for this could be moving towards using On the other hand it could be a lot of work to try to use it everywhere.
I haven't had any significant performance issues. I'm at around 2.6s with no caching and 1.4s with caching. I do know that the new xml formatting added some overhead.
#1595 in theory should have minimal overhead and makes sure no two threads are duplicating the work of parsing the gitignore. I haven't seen any degradation from it. |
aa8262e
to
0d02f6b
Compare
0d02f6b
to
b1a19ac
Compare
Added
ValueListBuilder
toPrivatePrintLeadingTrivia
saving 0.55 MBValueListBuilder.Pop
- this is an unmodified copy of microsoftsPop
Insert(int index, T item)
ValueListBuilder.ToList
this is becauseCompilationUnit
needs the resultingIList<Doc> contents
to be an actualList<Doc>
instead of an array.CompilationUnit.Print
to not need a mutable list WDYT.This isn't a massive saving I can close this if you like. I suspect this is more impactful for projects with a lot of comments and summaries though.