DevToys icon indicating copy to clipboard operation
DevToys copied to clipboard

Text case converter and inspector only shows 12108 lines when pasting a really long string

Open DavidCZ2051 opened this issue 2 years ago • 4 comments

Description

The "Text case converter and inspector" only shows 12108 lines but still counts the information right when pasting a long string.

Steps To Reproduce

  1. Go to the "Text case converter and inspector".
  2. Paste in a long string that has over 12108 lines.
  3. Wait for it to process.

Expected behavior

Should show all the lines pasted by the user.

DevToys Version

Version 1.0.6.0 | X64 | RELEASE | c032ebb | c032ebb

Relevant Assets/Logs

screenshot

DavidCZ2051 avatar Apr 15 '22 15:04 DavidCZ2051

I'll start working on this one.

L1nu5 avatar Apr 16 '22 00:04 L1nu5

I think there is another issue here- DevToys is frozen for the entire duration of the copy paste of such huge text data. I noticed that memory usage is well beyond 1GB. For me, I could not use DevToys after pasting the text and here are the statistics of the loaded text.

Edit: DevToys worked fine, it just takes a while after copying to get back to normal but this still affects UX.

image

image

I could think of two ways to fix this, but this could be a new feature itself:

  1. Have a file open dialog like feature instead of having to copy/paste this much text data (optional)
  2. Show a dialog box with a progress bar and a cancel button when data is being copied to the text input

L1nu5 avatar Apr 16 '22 02:04 L1nu5

This phenomenon is related to the CustomTextBox drawing process. Issue #275 was (temporarily) solved by setting the output to a maximum of 10,000 lines.

niyari avatar Apr 18 '22 20:04 niyari

Yeah, it's unfortunately a known limitation of UWP's TextBox :( It doesn't scale well with very large texts... Code Editor (precisely the monaco-editor used in DevToys) has a better tolerance, but as you likely noticed, it takes about 1 second to load on each tool. If we use it on absolutely every tool, I'd find it a bit sad.

I guess another possibility is to re-implement ourselves a fully functional text box, but that's a very long and challenging work actually.

As of today, I don't have an ideal solution to bring. The best is likely the Code Editor, but again, not ideal...

veler avatar May 14 '22 06:05 veler

Fixed in DevToys 2.0

veler avatar Aug 29 '23 14:08 veler