DevToys
DevToys copied to clipboard
Text case converter and inspector only shows 12108 lines when pasting a really long string
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
- Go to the "Text case converter and inspector".
- Paste in a long string that has over 12108 lines.
- 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
I'll start working on this one.
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.
I could think of two ways to fix this, but this could be a new feature itself:
- Have a file open dialog like feature instead of having to copy/paste this much text data (optional)
- Show a dialog box with a progress bar and a cancel button when data is being copied to the text input
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.
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...
Fixed in DevToys 2.0