Comments (3)
There's going to be some fixed footprint associated with Electron that is unavoidable. This mostly boils down to memory, but starting a window might also be somewhat slower than a more focused application using a native toolkit.
The goal is to strike the right balance between the flexibility and extensibility afforded by Electron and the performance goals mentioned in the README. Specifically, on newish hardware, we want to run at 8ms for animations and common text operations, 50ms for coarse-grained operations like opening an editor, and 150ms to open a window.
I'm sure there are editors that can and will do better than this, and we could certainly do better if we bypassed Electron completely. But I think based on user research that meeting these goals will yield a satisfyingly responsive user experience, and in exchange we'll get the benefits of Electron for extensible, cross-platform UI.
So to minimize the overhead of Electron, we're thinking about the following kinds of techniques:
- Limit JS to scripting interactions with the UI and do the rest in Rust. This minimizes pressure on the garbage collector and avoids needing to rely on keeping the V8 optimizer happy. It gives us access to an affine memory model that keeps the CPU cache and prefetcher happy, etc. Simple code is fast by default.
- Activate packages on worker threads. Again, this avoids needing to run setup work on the main thread which hurts Atom's window startup time today and doesn't scale.
- Mandatory use of V8 snapshots on any view code, including packages.
- Avoid using the DOM for intense use cases like the editor text rendering.
Basically, let's make the most of the strengths of Electron as a flexible, cross-platform UI framework, but use the most efficient techniques possible. This is the opposite of Atom's approach, which tries to embrace the "web" way of doing things as much as possible.
It's all about trade-offs. Hacker News loves to hate on Electron and some people will just never be satisfied with anything use it. But web tech does offer the most compelling cross-platform UI framework that I am aware of, and one that is guaranteed to be around and improving for years to come.
Hope this helps.
from xray.
Do you think there are places in Electron that can be optimized to benefit all apps, not only xray?
from xray.
Do you think there are places in Electron that can be optimized to benefit all apps, not only xray?
I think that's mostly up to Chromium, and it continues to improve.
from xray.
Related Issues (20)
- Electron version HOT 1
- IMHO, if you call it experimental, you had better not call it "next-generation".
- memo_core filesystem sync status? HOT 3
- Memo: include `path` in Entry
- [Memo] Adding a file to a subdirectory works, but reading it fails HOT 2
- [Memo] There is no API to undelete a file. HOT 3
- [Memo] Adding a `Changed` file status. HOT 3
- [Memo] `parentId` could be hidden from the user-facing API HOT 3
- [Memo] Change notifications? HOT 2
- Xray panics when scrolling too fast while editing README.md HOT 7
- [Memo] There isn't an API call to verify a path's existence
- [memo] There is no way to stop listening to buffer changes
- [memo] Extra methods for Buffers
- [Memo] Confusing error message about ReplicaId HOT 1
- panic at index out of bounds HOT 1
- Question: Can we potentially use x-ray on a thin-client while the x-ray core server could be installed remotely? (Hackable Cloud IDE?) HOT 1
- Is it dead? HOT 12
- Missing XRAY_SERVER_PATH environment variable HOT 4
- 此项目停了吗? HOT 2
- Future plans for xray? HOT 2
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 xray.