Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Lazy load Tor instead of at startup #14617

Closed
bbondy opened this issue Jun 30, 2018 · 6 comments · Fixed by #14668
Closed

Lazy load Tor instead of at startup #14617

bbondy opened this issue Jun 30, 2018 · 6 comments · Fixed by #14668

Comments

@bbondy
Copy link
Member

bbondy commented Jun 30, 2018

Test plan

See #14668

Description

Currently Tor is loaded always at startup, but not everyone wants Tor.
This negatively affects startup time and also bypasses the ability to not use Tor which is important especially for corporate users.

Steps to Reproduce

  1. npm start

Actual result:
You can see Tor logging

Expected result:
You only see Tor logging once the first private tab is opened.

Reproduces how often:
Always at startup

Brave Version

about:brave info:
Brave: 0.23.19
V8: 6.7.288.46
rev: 178c3fb
Muon: 7.1.3
OS Release: 17.5.0
Update Channel: Release
OS Architecture: x64
OS Platform: macOS
Node.js: 7.9.0
Tor: 0.3.3.7 (git-035a35178c92da94)
Brave Sync: v1.4.2
libchromiumcontent: 67.0.3396.87

Reproducible on current live release:
Yes

Additional Information

@darkdh
Copy link
Member

darkdh commented Jun 30, 2018

It used to be lazy load but we change it to asynchronous launching from launcher thread at browser startup mainly because tor startup takes time and often unpredictable so users will experience opening a tor tab but unable to use it and see proxy connection error. So launching tor at startup won’t let users suffer from this most of the time.
Just to clarify the main reason we did that change, we can use lazy load for sure, just need to block user from typing into urlbar (we already have the tor connection status)
until tor is ready.

@darkdh
Copy link
Member

darkdh commented Jun 30, 2018

@diracdeltas and @riastradh-brave can elaborate ^ if I missed anything

@riastradh-brave
Copy link
Contributor

The startup is slowest the first time around; then tor caches some network information that enables it to start up faster the next time around.

Another option would be to automatically start Tor (which, except for a couple of directory creations, is asynchronous) only for users who have chosen to use Tor in some way, as long as there is a configuration doohickey for turning it back off.

@srirambv
Copy link
Collaborator

srirambv commented Jul 6, 2018

Verified on Windows 10 x64 using

  • 0.23.31 - 3148ace
  • Muon - 7.1.5
  • libchromiumcontent - 67.0.3396.103

@bsclifton
Copy link
Member

Verified on macOS using

  • 0.23.31 - 3148ace
  • Muon - 7.1.5
  • libchromiumcontent 67.0.3396.103

@jasonrsadler
Copy link
Contributor

jasonrsadler commented Jul 6, 2018

Verified on XUbuntu 18.04 x64 using

  • 0.23.31 - 3148ace
  • Muon - 7.1.5
  • libchromiumcontent - 67.0.3396.103

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.