Live data from Hacker News

Improving startup time in Atom with V8 snapshots

blog.atom.io

131–140 of 173 posts

Re: Improving startup time in Atom with V8 snapshots

#131

Earlier quoted context omitted.

Using web technology was less about making development easier on us , because in many ways it made it harder. Web technology is about enabling extension authors to use a powerful and familiar technology to achieve their goals.

Could you give some examples of extensions that benefit from Atom being built on Electron instead of just embedding a JavaScript or Python interpreter?

Most of them!

The minimap extension is made easy because they can just throw some HTML in a side pane, the image preview plugin just leverages the image displaying abilities of the browser, custom styling is as easy as throwing some CSS in a file, the extensions which let you preview the web page you are working on right in the browser use the full extent of the browser, the plugin that lets you easily preview markdown just uses a simple markdown->html converter then just displays the HTML/css. Themes are just a set of CSS which targets certain classes. Plugins can move, change, hide, show, do anything.

It also let's plugin authors do things the original developers never imagined possible. 3D object preview using webgl in a custom pane, replacing the whole implementation of tabs with something else, completely redesigning how the sidebar works and looks because it's all just HTML.

And while none of that can ONLY be done in a browser, the fact that a browser is the UI means that it's much easier, much quicker, and much more maintainable.

Re: Improving startup time in Atom with V8 snapshots

#132

Earlier quoted context omitted.

>don't distribute your programs That's what it really comes down to. From what I can see, it's mostly an emotional response. I'd be surprised if code/binary obfuscation is a net win in general. I've had to disabuse developers of this idea. One distributed binaries that weren't quite valid but ran on the CLR, though not Mono. A 10 line script was enough to remove the invalid sequences. What did the developer gain in t…

I agree with the idea that anything can be reverse engineered. However electron by default has plain text javascript code. I'd like to prevent people from editing plain text (!!!) to evade my licensing check!

Perhaps try hosting a page with a crack or serial for your product and see if there's significant usage in the first place? My guess is people are more worried about this than it warrants. A user of professional tools opting to edit the source code of a tool every time it updates seems like they might not be a paying customer in the first place.

Re: Improving startup time in Atom with V8 snapshots

#133
post #8

Earlier quoted context omitted.

Electronics design software. :) Most of the time is spent doing fine collisions with shapes coming out of an R-tree to build up a connection graph. For the vast majority of designs, it's fast. For very dense, imported designs, it can get slow. (No two tools keep data in the same form, so translating leads to inefficiencies.)

I recently evaluated all online EDAs that I could find. Some of them where quite slow because they used SVG for rendering. I would love to see your tool, too. Unfortunately, I couldn't find it in your profile. Do you have a link?

https://upverter.com/

We use canvas, which saves us from the SVG DOM, but it also means managing the scene ourselves. If I ever get some time, I'd like to experiment with a WebGL renderer...

Re: Improving startup time in Atom with V8 snapshots

#134
post #11

New world, same old problems. Fascinating to see how this parallels the way Emacs tackled this problem long ago. - https://lwn.net/Articles/673724/ - https://news.ycombinator.com/item?id=11001796

It's because when you truly add a new capability to your toolset, like 100ms installs, or universal cross platform loading, this has ripple effects through every problem you solved before. Some things simply don't work in the new codebase, other things have regressed. Then you go back and one-by-one you fix everything to work in this new reality. This happens every time our aggregate software architecture gets a big new ability.

Of course if you're touching the same code over and over again, that's probably a sign you're not solving the problem well. Solving problems with a finality such that they don't have to be reopened again and again is the aim of good software engineering. That is true.

But in order to get there, you need to periodically add a major new capability—and thus a major new assumption—to your architecture. If you're not making these kinds of sweeping changes every now and then it's almost certain that you're not actually doing deep refactors that resolve longstanding challenges in lower energy ways.

Resistance to these kinds of sweeping changes amongst professional developers and their ambassadors at major platform companies is the reason why Windows, iOS, Oracle, and the like have stable interfaces and smaller audiences. On the web you don't need permission to write a whole new JavaScript framework, so people can take those first big steps, even though they are quite painful for the developer.

Re: Improving startup time in Atom with V8 snapshots

#135
post #11

New world, same old problems. Fascinating to see how this parallels the way Emacs tackled this problem long ago. - https://lwn.net/Articles/673724/ - https://news.ycombinator.com/item?id=11001796

And here's a relevant explanation from drfuchs.

https://news.ycombinator.com/item?id=13076098

I quote it in full, here:

OK, if you promise to stay off my lawn, I'll explain the history behind undump. Back in the 70's, the big CS departments typically had DEC 36-bit mainframes (PDP-10, PDP-20) running the Tops10/Tops20/Tenex/Waits/Sail family of operating systems. These are what Knuth used to do all of TeX, McCarthy LISP, and Stallman and Steele EMACS. Not Unix; and Linus hadn't touched a computer yet.

Executable program files were not much more than memory images; to run a program, the OS pretty much just mapped the executable image into your address space and jumped to the start. But when the program stopped, your entire state was still there, sitting in your address space. If the program had stopped due to a crash of some sort, or if it had been in an infinite loop and you had hit control-C to interrupt it, the program was still sitting there, even though you were staring at the command prompt. And the OS had a basic debugging capability built-in, so you could simply start snooping around at the memory state of the halted program. You could continue a suspended program, or you could even restart it without the OS having to reload it from disk. It was kind of a work-space model.

Translating into Linux-ish, it's as if you always used control-Z instead of control-C, and the exit() system call also behaved like control-Z; and gdb was a builtin function of the shell that you could invoke no matter how your program happened to have been paused, and it worked on the current paused process rather than a core file (which didn't exist).

The OS also had a built-in command to allow you to SAVE the current memory image back into a new executable file. There wasn't much to this command, either, since executables weren't much more than a memory image to begin with. So, the equivalent of dump/undump was really just built into the OS, and wasn't considered any big deal or super-special feature. Of course, all language runtimes knew all about this, so they were always written to understand as a matter of course that they had to be able to deal with it properly. It pretty much came naturally if you were used to that environment, and wasn't a burden.

Thus, when TeX (and I presume the various Lisp and Emacs and etc. that were birthed on these machines) were designed, it was completely expected that they'd work this way. Cycles were expensive, as was IO; so in TeX's case, for example, it took many seconds to read in the basic macro package and standard set of font metric files and to preprocess the hyphenation patterns into their data structure. By doing a SAVE of the resulting preloaded executable once during installation, everyone then saved these many seconds each time they ran TeX. But when TeX was ported over to Unix (and then Linux), it came as a bit of a surprise that the model was different, and that there was no convenient, predefined way to get this functionality, and that the runtimes weren't typically set up to make it easy to do. The undump stuff was created to deal with it, but it was never pretty, since it was bolted on. And many of use from those days wonder why there's still no good solution in the *nix world when there are still plenty of programs that take too damn long to start up.

Re: Improving startup time in Atom with V8 snapshots

#136

Earlier quoted context omitted.

How do you think an IDE "does all the work" for you? Somebody working on the editor wrote some code in C++ or Java or whatever that makes it do that, and that code is baked into the IDE. In emacs, the only missing part is that perhaps nobody has already written the elisp that makes it do whatever task you are asking for. emacs is a smallish program written mostly in C that defers to a scripting language for nearly ev…

Thats exactly my point, theyve written all the various features you might have to write yourself, and theyve integrated them for you.

guess it's a tradeoff. if what you want is common enough, it's quite possible it'll already have been written. if not, you may have to write elisp yourself.

but, if what you're working on is not common, maybe there isn't a (good) IDE either.

Re: Improving startup time in Atom with V8 snapshots

#137
post #35

Earlier quoted context omitted.

> Must every thread about VSCode and Atom start the same way If many people believe this is the case, why not? All articles get some common types of responses based on the topic, this is just one topic/response combo that you happen to disagree with. > It's a trade off: performance for a cross platform JavaScript app development. It's an unnecessary tradeoff. If a single developer can create ST from scratch for Windo…

> If a single developer can create ST from scratch for Windows, OS X and Linux, One of the reasons why some people are switching from ST to Atom/VSCode is the former's tortured development schedule, which has seen months or years go by without an update. Contrast VSC, which reliably delivers a heap of improvements every month. JavaScript is probably responsible for a big portion of this. Again, it's a tradeoff. > the…

VS Code's release record is impressive. And didn't it grow out of the Monaco browser-based editor? Microsoft probably wouldn't have funded the hypothetical C++ version.

That said, one of the Atom developers says using web technologies made development harder in many ways.[1] Very few solo developers can match a team with Microsoft's resources, and a monthly release schedule is more about discipline than anything else.

[1] https://news.ycombinator.com/item?id=14142124

Re: Improving startup time in Atom with V8 snapshots

#138
post #11

New world, same old problems. Fascinating to see how this parallels the way Emacs tackled this problem long ago. - https://lwn.net/Articles/673724/ - https://news.ycombinator.com/item?id=11001796

And here's a relevant explanation from drfuchs. https://news.ycombinator.com/item?id=13076098 I quote it in full, here: OK, if you promise to stay off my lawn, I'll explain the history behind undump. Back in the 70's, the big CS departments typically had DEC 36-bit mainframes (PDP-10, PDP-20) running the Tops10/Tops20/Tenex/Waits/Sail family of operating systems. These are what Knuth used to do all of TeX, McCarthy L…

Hey! I don't get the karma points?!

Re: Improving startup time in Atom with V8 snapshots

#139
post #35

Earlier quoted context omitted.

> Must every thread about VSCode and Atom start the same way If many people believe this is the case, why not? All articles get some common types of responses based on the topic, this is just one topic/response combo that you happen to disagree with. > It's a trade off: performance for a cross platform JavaScript app development. It's an unnecessary tradeoff. If a single developer can create ST from scratch for Windo…

> If a single developer can create ST from scratch for Windows, OS X and Linux, One of the reasons why some people are switching from ST to Atom/VSCode is the former's tortured development schedule, which has seen months or years go by without an update. Contrast VSC, which reliably delivers a heap of improvements every month. JavaScript is probably responsible for a big portion of this. Again, it's a tradeoff. > the…

>Contrast VSC, which reliably delivers a heap of improvements every month. JavaScript is probably responsible for a big portion of this.

I am pretty sure the project being open source and in the hand of a team in a big company instead of an independent developer has more to do with it.

Re: Improving startup time in Atom with V8 snapshots

#140
post #133

Earlier quoted context omitted.

I recently evaluated all online EDAs that I could find. Some of them where quite slow because they used SVG for rendering. I would love to see your tool, too. Unfortunately, I couldn't find it in your profile. Do you have a link?

https://upverter.com/ We use canvas, which saves us from the SVG DOM, but it also means managing the scene ourselves. If I ever get some time, I'd like to experiment with a WebGL renderer...

Do you have any blog posts or similar about how you're managing the scene graph? I've been thinking a lot about building a scene graph lately, and coordinate -> component mapping seems expensive in time and/or memory depending on how you do it.
Post reply on HN