Open artagnon opened 9 years ago
+1, will keep in mind during refactoring
So I've spent a few weekends working on this, and I've got something close, but not quite there: https://github.com/Osmose/advanced-open-file/compare/react
Here's what happened:
Path
model class an into a single fileService
object. This was to implement caching of file operations in one spot. It didn't really help our speed on large directories. I realized that the massive amount of DOM elements being inserted was a likely culprit.react-infinite
that would only render visible elements in the list. It made a huge difference in the rendering time of directories with a lot of elements. However, loading the directory still took a second or two, and froze the UI.I suspected that the React DOM diffing was taking a long time, but my recent profiling attempts show some weird call graphs:
That's after typing another letter in a common prefix of a directory with 10,000 files. Those three flat peaks are topped with removeChild
calls that take between 50ms and 100ms deep within React's DOM-change code. But those huge gaps are trouble too.
So I'm still investigating. But help is always appreciated!
Especially after typing
~/
, it hangs for a bit for me. It would be nice if we could do the IO of listing the entries in a directory incrementally.