Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Upgrade to Electron and Chrome 42 - #6877

Closed
kevinsawicki wants to merge 27 commits into
masterfrom
ks-electron-chrome-42
Closed

kevinsawicki wants to merge 27 commits into
masterfrom
ks-electron-chrome-42

Conversation

@kevinsawicki

Copy link
Copy Markdown
Contributor

Updates the build to use electron 0.26 and gets Atom running on Chrome 42

  • Test on Mac
  • Test on Linux
  • Test on Windows

Closes #6505

@anaisbetts

Copy link
Copy Markdown
Contributor

Did this actually work for you? How are your native modules not all broken? We had to use npm shrinkwrap and hand-edit the shrinkwrap file to force install nan 1.8.4 everywhere

@kevinsawicki

Copy link
Copy Markdown
Contributor Author

Did this actually work for you?

Yeah, it ran on my mac.

How are your native modules not all broken?

Maybe because they all use nan like this? https://github.com/atom/node-keytar/blob/d801e60eb06a36ccbc0322e56d9e77abcf9cb21e/package.json#L44

@anaisbetts

Copy link
Copy Markdown
Contributor

Maybe because they all use nan like this? https://github.com/atom/node-keytar/blob/d801e60eb06a36ccbc0322e56d9e77abcf9cb21e/package.json#L44

Yeah, that version of nan is definitely busted for us. Weird.

@kevinsawicki
kevinsawicki force-pushed the ks-electron-chrome-42 branch from 6ecda60 to 07feec6 Compare May 21, 2015 22:21
@kevinsawicki
kevinsawicki force-pushed the ks-electron-chrome-42 branch from 5eebf31 to c5fe5d4 Compare May 21, 2015 23:38
@YurySolovyov

Copy link
Copy Markdown

Looks like there will be chrome 43, not sure about timing though, but maybe it is better to update straight to that?

@izuzak

izuzak commented May 22, 2015

Copy link
Copy Markdown
Contributor

Similar PR was started here: #6505. Just adding it here as a reference so that we can close that after this is merged. Also, that PR has some other nice changes, e.g. changes to code comments where atom-shell was used as a name to use electron -- might be nice to do that here as well?

@zcbenz

zcbenz commented Jun 2, 2015

Copy link
Copy Markdown
Contributor

I need some work on Electron side to make snapshot work, so I'll try updating Atom to Chrome 43 in this PR.

@paulcbetts already reported node-spellcheck crashes on Chrome 43, I think many of the modules using nan would have the same problem.

@zcbenz

zcbenz commented Jun 2, 2015

Copy link
Copy Markdown
Contributor

@v3ss0n

v3ss0n commented Jun 2, 2015

Copy link
Copy Markdown

thats a lot of bugs in chrome 43 then

@zcbenz

zcbenz commented Jun 2, 2015

Copy link
Copy Markdown
Contributor

I have updated this branch with snapshot support, there is still something not working because of Chrome's bug, but it is enough to test how well snapshot works.

The conclusion is snapshot doesn't save loading time for Atom.

Snapshot boosts startup time by reducing file reading time and JS compilation time to minimum. For file reading time, since Atom is using asar archive, we already have done the best we can, and snapshot itself has its own overhead, it needs to read the huge snapshot file (which is larger than the asar archive) and create a huge object on the heap.

For the JS compilation time, V8 compiles the JS file already very fast, the actual time spent on compilation is quite minor, and since V8 tends to do lazy optimizations when running the code, most time are spent on running the code instead of compiling the code.

So compared to the time saved by snapshot, the overhead of snapshot actually makes things slower.

@anaisbetts

Copy link
Copy Markdown
Contributor

@zcbenz sounds like our princess is in another castle. One idea I had recently was to somehow make a lazy version of require, or somehow defer all of those imports that always happen at the top of a file but aren't necessarily used immediately (or at all!) in the code until later

@zcbenz

zcbenz commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

One idea I had recently was to somehow make a lazy version of require, or somehow defer all of those imports that always happen at the top of a file but aren't necessarily used immediately (or at all!) in the code until later

Some modules might do some initialization work when being "require"d, one example is graceful-fs. But generally I think it is a good idea.

IMO the key to quicker startup is to show the initial page as quick as possible, it is hard to make things faster if we have to do lots of computations or IO operations before actually showing the content.

@thomasjo

Copy link
Copy Markdown
Contributor

I'm contemplating picking this up and continuing the effort started by @kevinsawicki and @zcbenz. Anything in particular I should know that has not been discussed here?

@despairblue

Copy link
Copy Markdown

This would be cool, this would allow opening links under linux with chrome again (electron/electron#1348).

@thomasjo thomasjo mentioned this pull request Jul 13, 2015
20 tasks done
@kevinsawicki

Copy link
Copy Markdown
Contributor Author

Closing in favor of #7877

@kevinsawicki
kevinsawicki deleted the ks-electron-chrome-42 branch July 31, 2015 21:46
@winstliu winstliu mentioned this pull request Oct 23, 2015
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants