
For example, a 600K Css production-level file would have 600,000 characters on a single line.Such files often appear in the project directory after the front-end project is compiled.
Although it is almost unreadable, it takes a long time when the user clicks to open it.
There are two main problems I have encountered so far:
(1)For a large 600K single-line file, Document.Loadfile() method takes about 2 seconds to load. Is there any way to optimize this?
(2)After Document.LoadFile() I want to use the properties on the Document to determine whether the file is a single-line large file to decide whether to register the syntax service.But I don't know when this judgment should be made. When Document.LoadFile() is finished, SyntaxEditor.Document doesn't have any content.