wire-desktop icon indicating copy to clipboard operation
wire-desktop copied to clipboard

Move away from Electron for desktop app

Open cajuntechie opened this issue 9 years ago • 10 comments

Because of the underlying architecture of how Electron based apps are packaged and function, they use a lot of memory on the systems on which they're installed. Running a few trivial Electron based apps at the same time can easily tear through several gigs of memory and negatively effect system performance. There is no need to make this sacrifice when other, better solutions like React Native, etc are available.

I'd like to encourage Wire to move away from Electron and towards something like React Native or another, less resource hungry, solution.

cajuntechie avatar Apr 11 '17 15:04 cajuntechie

It looks like you just read the Hacker News/Reddit.. :)

React Native?! Isn't that for native mobile apps? We already have native apps for Android and iOS.

lipis avatar Apr 11 '17 15:04 lipis

Indeed I have. But I've been meaning to file this issue for a while now ever since I found out Wire was based on Electron. The Reddit thread definitely reminded me and gave me a good thing to point to :-)

React Native is mostly for building mobile apps, yes. But it can be used to build UWP apps as well and, I suppose you'd need something slightly different for the Linux and Mac apps. Still, it could be worth the change for the improved performance on resource limited systems.

cajuntechie avatar Apr 11 '17 15:04 cajuntechie

@cajuntechie, have you seen https://github.com/wireapp/coax?

ConorIA avatar Apr 11 '17 16:04 ConorIA

@cajuntechie @ConorIA I have started a prototype for a much lighter desktop client for Wire. It's called Fibre - https://gitlab.com/ddobrev/Fibre/ . It consumes 80 % less memory and less power as well.

ddobrev avatar Oct 04 '17 18:10 ddobrev

@ddobrev, very cool. Is this cross-platform. Also, I understand that the Wire desktop app has some security features like certificate pinning. That would be good to implement.

For even faster performance, I'd love to see a QML interface to Coax.

ConorIA avatar Oct 04 '17 19:10 ConorIA

@ConorIA the goal is to make it cross-platform, yes, but just for the desktop - there already are native mobile clients. About certificate pinning, it's already there for the simple reason that I actually host app.wire.com in a web view. I don't have nearly enough time for a complete native client but, as you can see from the listed numbers, even a web view is a huge head start compared to the garbage that is Electron.

ddobrev avatar Oct 04 '17 23:10 ddobrev

@ddobrev, I played around with it a little. Very fast. Well done.

ConorIA avatar Oct 05 '17 00:10 ConorIA

@ConorIA I am glad you like it. As I said, my time is limited but I believe that if I can get some help from testers and especially fellow developers, I can add a menu and notifications relatively quickly.

ddobrev avatar Oct 05 '17 00:10 ddobrev

@ddobrev great. I whipped up a quick PKGBUILD and will be happy to maintain a more feature-rich version in the AUR (unless you'd like to do that yourself). Just let me know what you are ready for prime-time! 😉 Also, specify a license!

# Maintainer: Conor Anderson <[email protected]>
pkgname=fibre-git
_pkgname=${pkgname%-git}
pkgver=913e266
pkgrel=1
pkgdesc="Fibre is a prototype for a lighter desktop client for Wire"
arch=('x86_64')
url="https://gitlab.com/ddobrev/Fibre"
license=('unspecified')
depends=('qt5-webview')
makedepends=('git')
source=('fibre::git+https://gitlab.com/ddobrev/Fibre')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${_pkgname}"
  printf "%s" "$(git describe --always)"
}

prepare() {
  cd "$srcdir/${_pkgname}"
  mkdir -p build
}

build() {
  cd "$srcdir/${_pkgname}/build"
  qmake ..
}

package() {
  cd "$srcdir/${_pkgname}/build"
  make INSTALL_ROOT="$pkgdir/" install
}

ConorIA avatar Oct 05 '17 00:10 ConorIA

@ConorIA wow, that was fast! Thank you very much, for all three of the scripts, the commitment to AUR and the tip about the license. Please send me a pull request if you'd like to have it in the repository of Fibre.

ddobrev avatar Oct 05 '17 00:10 ddobrev