mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

BlockStructureFoldingTextEditorExtension is running on UI thread #6235

Closed Therzok closed 6 years ago

Therzok commented 6 years ago

This whole bit of code is running on the UI thread.

Given that UpdateFoldings explicitly synchronizes to the UI thread, we should be running the outlining service calls at least on a background thread.

2.12%   HandlerInternal  •  1,093* ms  •  92 calls  •  GLib.SourceProxy.HandlerInternal(IntPtr)
  2.00%   Invoke  •  1,032* ms  •  29 calls  •  Gtk.Application+InvokeProxy.Invoke
    1.92%   <StartReparseThreadDelayed>b__4  •  992* ms  •  4 calls  •  MonoDevelop.Ide.Gui.Document+<>c__DisplayClass126_2.<StartReparseThreadDelayed>b__4(Object, EventArgs)
      1.92%   OnDocumentParsed  •  992* ms  •  4 calls  •  MonoDevelop.Ide.Editor.DocumentContext.OnDocumentParsed(EventArgs)
        1.92%   DocumentContext_DocumentParsed  •  990* ms  •  4 calls  •  MonoDevelop.Ide.Editor.Extension.BlockStructureFoldingTextEditorExtension.DocumentContext_DocumentParsed(Object, EventArgs)
          1.92%   Start  •  990* ms  •  4 calls  •  System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start(ref TStateMachine)
            1.92%   MoveNext  •  990* ms  •  4 calls  •  MonoDevelop.Ide.Editor.Extension.BlockStructureFoldingTextEditorExtension+<DocumentContext_DocumentParsed>d__5.MoveNext
               1.86%   GetBlockStructureAsync  •  957 ms  •  4 calls  •  Microsoft.CodeAnalysis.Structure.BlockStructureServiceWithProviders.GetBlockStructureAsync(Document, CancellationToken)
              ►0.06%   UpdateFoldings  •  33 ms  •  3 calls  •  MonoDevelop.Ide.Editor.Extension.BlockStructureFoldingTextEditorExtension.UpdateFoldings(TextEditor, ImmutableArray, Int32, CancellationToken)
               0.00%   15 functions hidden  •  0 ms total  •  61 calls total
             0.00%   2 functions hidden  •  0 ms total  •  7 calls total
           0.00%   2 functions hidden  •  0 ms total  •  8 calls total
         0.00%   12 functions hidden  •  1 ms total  •  47 calls total
       0.00%   2 functions hidden  •  0 ms total  •  12 calls total
    ►0.04%   <UpdateFoldSegments>b__2  •  23 ms  •  3 calls  •  Mono.TextEditor.TextDocument+<>c__DisplayClass194_1.<UpdateFoldSegments>b__2(Object, EventArgs)
    ►0.03%   <HandleFoldTreeUpdated>b__9_0  •  16 ms  •  3 calls  •  Mono.TextEditor.HeightTree.<HandleFoldTreeUpdated>b__9_0(Object, EventArgs)
     0.00%   6 functions hidden  •  1 ms total  •  19 calls total
  ►0.08%   Invoke  •  40 ms  •  47 calls  •  GLib.Timeout+TimeoutProxy.Invoke
  ►0.04%   Invoke  •  22 ms  •  16 calls  •  GLib.Idle+IdleProxy.Invoke
   0.00%   2 functions hidden  •  0 ms total  •  184 calls total

VS bug #700199

xamarin-release-manager commented 6 years ago

[sync] [VS-15] Comment by xamarinc

Fixed in version 7.8.0.891 (master)

Pull Request #6349 merged by: Marius Ungureanu
Author: mono
Commit: 220cdf3e78d416ee451af52f2133901a1f39429c (mono/monodevelop)

xamarin-release-manager commented 6 years ago

[sync] [VS-17] Comment by xamarinc

Fixed in version 7.7.0.1656 (release-7.7)

Pull Request #6361 merged by: Lluis Sanchez
Author: mono
Commit: 3ae063c58955fa118324fafca5cbcb9c37f8fc32 (mono/monodevelop)

xamarin-release-manager commented 6 years ago

[sync] [VS-20] Comment by xamarinc

Fixed in version 8.0.0.471 (release-8.0)

Pull Request #6349 merged by: Marius Ungureanu
Author: mono
Commit: 220cdf3e78d416ee451af52f2133901a1f39429c (mono/monodevelop)

xamarin-release-manager commented 5 years ago

[sync] [VS-23] Comment by xamarinc

Fixed in version 8.0.0.1738 (release-8.0)

Author: therzok
Commit: 53cf8bc015008547e4a49c161d2a512c2dc7ece1 (xamarin/monodevelop)

xamarin-release-manager commented 4 years ago

[sync] [VS-30] Comment by xamarinc

Fixed in version 8.6.0.802 (master)

Pull Request #6349 merged by: Marius Ungureanu
Author: mono
Commit: 220cdf3e78d416ee451af52f2133901a1f39429c (xamarin/monodevelop)