Comments (2)
+1, will keep in mind during refactoring
from advanced-open-file.
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:
- I wanted to make all the file operations async. But the current view code had grown to be difficult to follow and made making this change difficult.
- I rewrote the view code in React to see if it was easier to manage. My attempt was more complex than I'd like, but it was enough! There wasn't any real major performance improvement, which was expected.
- I moved all the file operation methods out of the
Path
model class an into a singlefileService
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. - I found a lovely React library called
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 made all the file operations async. It was a lot of playing the What Color is Your Function? game. This avoided locking up the UI for the first large directory read, but subsequent reads were still slow. I suspected the caching was to blame, but I tested by rendering the large list of files and then filtering on a common prefix, to avoid the caching. It still locked up.
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!
from advanced-open-file.
Related Issues (20)
- FR: Active file's project root option HOT 1
- UI Panel placement shifted below tab bar on One Dark theme HOT 2
- Add project folder doesn't close the modal form HOT 2
- Uncaught ReferenceError: path is not defined HOT 2
- popup path input is NOT wide enough. HOT 15
- Doesn't create new file OS 10.12 HOT 2
- Create numbered files using CTRL+N (like notepad++) HOT 2
- Open file UI doesn't work if no editor windows are open (in atom 1.17.0-beta0) HOT 1
- Open file from project in any level (recursively) HOT 1
- atom freeze when trying open a invalid path HOT 1
- [Feature request] Live highlighting of typed characters
- Feature request: auto open file HOT 2
- Windows: Add path as project dir fails when using linux like folder navigation HOT 1
- Add supported path with 'file://' HOT 1
- Duplicate File Option is Missing HOT 3
- Path/Name copy options ( Feature request ) HOT 1
- Function.extractParams is deprecated. HOT 3
- New file is created in the wrong location. HOT 2
- Path Autocomplete [Feature Request] HOT 1
- If the file list is long, atom crashes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advanced-open-file.