question-mark
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.

Seeing incredibly bad performance on .NET Core 3.1

See original GitHub issue

Describe the bug The HexEditor control causes very high refresh times in my .NET Core 3.1 app, with up to 500ms for a single refresh increasing with time.

To Reproduce Steps to reproduce the behavior:

  1. Create a new .NET Core 3.1 WPF application
  2. Include WpfHexaEditor in your project
  3. Create the following XAML window:
<Window x:Class="namespace:TestApp.TestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TestApp"
        xmlns:wpfHexaEditor="clr-namespace:WpfHexaEditor;assembly=WPFHexaEditor"
        mc:Ignorable="d">
    <Grid>
        <StackPanel Margin="5,5,5,5">
            <wpfHexaEditor:HexEditor x:Name="Editor"/>
        </StackPanel>
    </Grid>
</Window>
  1. Use the following constructor for the window:
			public TestWindow()
        {
            InitializeComponent();
            
            var stream = new MemoryStream(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 });
            MessageHexEditor.Stream = stream;
        }
  1. Observe that the app is very slow, and will progressively get slower with the log showing output like this:
REFRESH TIME: 375 ms
REFRESH TIME: 411 ms
REFRESH TIME: 396 ms
REFRESH TIME: 381 ms
REFRESH TIME: 419 ms

Expected behavior The app should be fast.

Screenshots When adding a hex edit control, the app is slow and will become unusable. image

Desktop (please complete the following information):

  • OS: Windows 10 1909
  • Framework: .NET Core 3.1
  • Package Version: 2.0.2

Is this an issue with my usage of the control? Is .NET Core 3.1 not supported yet?

This issue also occurs on .NET Core 3.0 and in Debug and Release builds.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Skyppidcommented, Nov 4, 2020

Can confirm, I added this into a relatively raw application (only one grid and that control next to it) and I my application hangs for about 1+ seconds when I resize or load the file (450kb binary file). Scrolling the view is also quite laggy.

Running on Core 3.1 as well.

0reactions
Skyppidcommented, Nov 5, 2020

To help you a little further, I noticed the following things:

  • It takes a very long time to maximize a window with this control
  • When resizing manually by cursor there’s different states where it performs better or worse (seems like it’s always an “address chunk” where it becomes more laggy wheras when the next becomes visible it renders a little smoother whereas it performed worst when the text representation on the right and the scrollbar was fully visible)

If I got time I might do a profiling session with Visual Studio to analyze the rendering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting ASP.NET Core Performance Problems
I recently had an opportunity to help a developer with an ASP.NET Core app that was functionally correct but slow when under a...
Read more >
ASP.NET Core 3.1 Hot Reload Slow
I have a ASP.NET Core 3.1 project which takes approximately 25 seconds to build. While this is not excessive, it's a slow development...
Read more >
Extremely slow build for asp.net core 3.1 apps #23435
I'm using visual studio community 2019 for developing asp.net core applications but i experience extremely slow builds that is really ...
Read more >
The Biggest ASP.NET Core Performance Problem
Net 5.0. ... 07:18 Benchmarking 3.1 vs 5.0 on windows 10:00 Conclusion. ... Troubleshooting Poor Largest Contentful Paint.
Read more >
ASP.NET Core Performance Optimization | by Ilya Nemtsev
When server memory is running low, garbage collection will happen more frequently and more aggressively · The longer an object stays alive in ......
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found