Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switching between documents slow

See original GitHub issue


I’m having an issue with LayoutDocument inside LayoutDocumentPane. When I add multiple LayoutDocuments inside the DocumentPane and if content of that LayoutDocuments has many UIElements (for example, tens of thousands of elements) switching between them is extremely slow - it seems that when clicked/switched to, LayoutDocument recalculates something with it’s child controls, including Canvas. Switching is super fast if hosted controls inside LayoutDocument are simple, with normal number of child items.

Also, docking from floating position back to “pinned” state also sometimes takes long time, same like switching between documents like above.

Any way to bypass this behavior? Users will have 10-15 documents open like that in “tabs” so switching between them should be fast.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

Dirkster99commented, Mar 29, 2020


it looks like you discovered 2 issues - the issue with the PropertyChanged might be a memory leak that occurs during switching/re-ordering tabs. I’ve already tried to close some of these issues:

but there might be more and its really hard to solve some of these because a solution might cause another side effect leading to another bug 😦 which is why I had to roll-back part of the above fixes in this commit Undoing LayoutGridControl changes commited on 2020-02-22 .

A pull request with GitHub is really easy and can be done through the web site and VS only:

  1. Create a Fork from the AvalonDock repository

    This should create a repository called matko238/AvalonDock.

  2. Clone the forked repository to your desktop PC (I prefer using a simple app called GitHub Desktop) and use the Clone button in the Web-Interface (this requires GitHub Desktop to be installed before cloning but it should also work via the VS option - I just have not done this with VS yet).

  3. Use Visual Studio to edit the cloned copy and commit changes via the Team Explorer (Tool Window) to your forked repository matko238/AvalonDock.

  4. Once you are happy with your changes, and they are commited to your forked repository, you can create a Pull Request via the web interface options in your repository:

Verify the branches shown and click Pull-Request: Untitled3

Use the next dialog to describe your changes in a human-readable format and click Create pull request to make the PR visible under Pull Requests in Dirkster99/AvalonDock:


This lengthy explanation makes it seem difficult but its really simple since you can do it all with the web interface and VS and I just tried to describe/screenshot all details hopping that its easy to follow. Please let me know if you have additional questions or a contribution 😃

matko238commented, Mar 29, 2020

Thank you very much for those instructions, I’ll try to push this change as soon as I test everything. Again, option should be added later on to disable this behavior if someone still wants to controls/documents be unloaded (removed from Visual tree) and loaded again when switched back to that document.

Performance is much better now (switching is almost instant) but memory leak is another issue someone more experienced should tackle.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slow down switching to another open document with
I have recently upgraded my Windows 10 system to ID 15.1.1. I commonly have two (or more) documents open and need to switch...
Read more >
InDesign taking FOREVER to switch between files open at ...
I am losing my mind -- it is literally taking 20+ seconds to switch from one file to the next in this program....
Read more >
Word slow when switching between documents
I was looking from year a solution to this problem, when I disabled the Adobe add-in the switching between documents became fast.
Read more >
Noticeable Delays when Switching Documents - Word Tips
It is also possible that a slowdown is due to some other program running on your system, and that program is hogging resources...
Read more >
Microsofyt Word and Excel - very slow to switch windows ...
New computer, Microsfot word - very slow and computer freezes for a time in between switching between two word documents or word and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found