Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-397121: RazorCSharpTypingAssist.FormatNonCSharpRBrace may be VERY slow

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Nov 29, 2013 8:31:55 PM
Updated Apr 26, 2018 6:01:43 PM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Critical
State Open
Type Performance Problem
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I was editing a cshtml file in VS2013. This file contains both html and large amount of javascript. I experienced significant delays between key strokes as Resharper was processing the file.


100.00 % FormatNonCSharpRBrace • 27,331 ms • JetBrains.ReSharper.Feature.Services.Razor.CSharp.TypingAssist.RazorCSharpTypingAssist.FormatNonCSharpRBrace(ITextControl, IFile, Int32, CodeFormatProfile)
97.02 % Format • 26,516 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase.Format(IFile, TreeTextRange, CodeFormatProfile, OuterSpaceFormatType, OuterSpaceFormatType, IProgressIndicator, IContextBoundSettingsStore)
97.02 % Format • 26,516 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.FormatterImplHelper.Format(IFile, TreeTextRange, CodeFormatProfile, OuterSpaceFormatType, OuterSpaceFormatType, IProgressIndicator, IContextBoundSettingsStore)
97.02 % Format • 26,516 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.Format(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator, IContextBoundSettingsStore)
97.02 % FormatInternal • 26,516 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.FormatInternal(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator, IContextBoundSettingsStore)
97.02 % TryCustomFormat • 26,516 ms • JetBrains.ReSharper.Psi.Razor.Impl.CodeStyle.RazorCodeFormatter.TryCustomFormat(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator)
97.02 % Format • 26,516 ms • JetBrains.ReSharper.Psi.Razor.Impl.CodeStyle.MixedRangeFormatter.Format
88.39 % Format • 24,159 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.Format(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator, IContextBoundSettingsStore)
88.28 % FormatInternal • 24,127 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.FormatInternal(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator, IContextBoundSettingsStore)
85.90 % RunFormatterForGeneratedLanguages • 23,478 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.RunFormatterForGeneratedLanguages(IFile, ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator)
85.79 % RunFormatterForGeneratedLanguage • 23,447 ms • JetBrains.ReSharper.Psi.Razor.Impl.CodeStyle.RazorCodeFormatter.RunFormatterForGeneratedLanguage(IPsiSourceFile, PsiLanguageType, DocumentRange, CodeFormatProfile, IProgressIndicator)
85.73 % RunFormatterForGeneratedLanguage • 23,431 ms • JetBrains.ReSharper.Psi.Html.Impl.CodeStyle.HtmlCodeFormatter.RunFormatterForGeneratedLanguage(IPsiSourceFile, PsiLanguageType, DocumentRange, CodeFormatProfile, IProgressIndicator)
64.90 % ToArray • 17,736 ms • System.Linq.Enumerable.ToArray(IEnumerable[TSource])
64.90 % Buffer1..ctor • 17,736 ms • System.Linq.Buffer1..ctor(IEnumerable[TElement])
64.90 % MoveNext • 17,736 ms • JetBrains.ReSharper.Psi.PsiManagerExtensions+<EnumerateIntersectingPsiFiles>d__a.MoveNext
41.35 % GetIntersectingRanges • 11,300 ms • JetBrains.ReSharper.Psi.Tree.FileExtensions.GetIntersectingRanges(IFile, DocumentRange)
25.80 % GetIntersectingRanges • 7,052 ms • JetBrains.ReSharper.Psi.Tree.FileExtensions.GetIntersectingRanges(IFile, TreeTextRange)
►16.60 % ToList • 4,536 ms • System.Linq.Enumerable.ToList(IEnumerable[TSource])
►8.75 % get_OriginalFile • 2,391 ms • JetBrains.ReSharper.Psi.Impl.Shared.RangeTranslatorWithGeneratedRangeMap.get_OriginalFile
0.11 % [Garbage collection] • 31 ms
►0.06 % Where • 16 ms • System.Linq.Enumerable.Where(IEnumerable[TSource], Func[TSourceBoolean])
►0.06 % SelectMany • 16 ms • System.Linq.Enumerable.SelectMany(IEnumerable[TSource], Func[TSourceIEnumerable[TResult]])
►0.06 % Add • 16 ms • System.Collections.Generic.List1.Add(T)
►15.09 % Translate • 4,124 ms • JetBrains.ReSharper.Psi.Tree.FileExtensions.Translate(IFile, DocumentRange)
►23.09 % GetPsiFiles • 6,311 ms • JetBrains.ReSharper.Psi.Files.PsiFiles.GetPsiFiles(IPsiSourceFile, PsiLanguageType, PsiLanguageCategories)
►0.11 % GetEnumerator • 31 ms • System.Collections.Generic.List
1.GetEnumerator
0.11 % MoveNext • 31 ms • System.Collections.Generic.List+Enumerator`1.MoveNext
►20.84 % Format • 5,695 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase.Format(IFile, TreeTextRange, CodeFormatProfile, OuterSpaceFormatType, OuterSpaceFormatType, IProgressIndicator, IContextBoundSettingsStore)
►0.06 % GetCodeBehindLanguageDefinedInFile • 16 ms • JetBrains.ReSharper.Psi.Web.Util.CodeBehindLanguageUtil.GetCodeBehindLanguageDefinedInFile(IPsiSourceFile)
►0.11 % CreateSurvivableTreeRangePointer • 31 ms • JetBrains.ReSharper.Psi.TreeRangeExtensions.CreateSurvivableTreeRangePointer(ITreeRange, Boolean)
►0.96 % CreateWriteLock • 261 ms • JetBrains.ReSharper.Psi.Tree.TreeNodeExtensions.CreateWriteLock(ITreeNode)
►0.45 % GetKey • 124 ms • JetBrains.Application.Settings.SettingsStoreEx.GetKey(IContextBoundSettingsStore, ISettingsOptimization, IDictionary[SettingsKeyObject])
►0.40 % DoIndent • 108 ms • JetBrains.ReSharper.Psi.Razor.Impl.CodeStyle.RazorCodeFormatter.DoIndent(CodeFormattingContext, HtmlCodeFormattingSettings, CodeFormatProfile, IProgressIndicator)
►0.28 % GetGlobalFormatSettings • 77 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase.GetGlobalFormatSettings(ITreeNode, IContextBoundSettingsStore)
►0.17 % GetProperContextBoundSettingsStore • 46 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase.GetProperContextBoundSettingsStore(IContextBoundSettingsStore, ITreeNode)
0.06 % AdjustFirstNode • 16 ms • JetBrains.ReSharper.Psi.Impl.CodeStyle.FormatterImplHelper.AdjustFirstNode(ICodeFormatterImpl, ITreeNode, ITreeNode)
►0.06 % TryCustomFormat • 16 ms • JetBrains.ReSharper.Psi.Razor.Impl.CodeStyle.RazorCodeFormatter.TryCustomFormat(ITreeNode, ITreeNode, CodeFormatProfile, IProgressIndicator)
►0.06 % CreateSurvivableTreeRangePointer • 16 ms • JetBrains.ReSharper.Psi.TreeRangeExtensions.CreateSurvivableTreeRangePointer(ITreeRange, Boolean)
►4.81 % GetIntersectedPairs • 1,315 ms • JetBrains.ReSharper.Psi.Impl.Shared.RangeTranslatorWithGeneratedRangeMap.GetIntersectedPairs(TreeTextRange[Original], Boolean)
►3.30 % FormatFileRange • 901 ms • JetBrains.ReSharper.Psi.CodeStyle.CodeFormatterHelper.FormatFileRange(IFile, TreeTextRange, CodeFormatProfile, IProgressIndicator, OuterSpaceFormatType, OuterSpaceFormatType)
►0.35 % ToList • 95 ms • System.Linq.Enumerable.ToList(IEnumerable[TSource])
►0.12 % First • 32 ms • System.Linq.Enumerable.First(IEnumerable[TSource])
►0.05 % FindTokenAt • 15 ms • JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.FindTokenAt(TreeOffset)
►1.89 % Dispose • 518 ms • JetBrains.ReSharper.Psi.Transactions.PsiTransactionCookie.Dispose
►1.09 % GetRangeToFormatAfterRBrace • 297 ms • JetBrains.ReSharper.Feature.Services.Html.Javascript.TypingAssist.JavaScriptHtmlTypingAssist.GetRangeToFormatAfterRBrace(ITextControl)

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>