Live data from Hacker News

LibreOffice running natively in the browser via WebAssembly

lab.allotropia.de

181–190 of 216 posts

Re: LibreOffice running natively in the browser via WebAssembly

#181
post #166

Extremely cool project and execution but it (hardly) runs on my MBP M1 Pro, 16 GB with FF and a 350mbit/s up-down connection and no other tabs open. Actions (clicking, dragging scrolling) takes a full two seconds to happen... Would have loved to play around with it!

I have the same hardware and was also using Firefox, and I got decent performance (only briefly tried it out though). Maybe it is a settings/extension thing?

Re: LibreOffice running natively in the browser via WebAssembly

#184

Something like this was tried before. The year was ~1995 and the trough of disillusionment for Java applets was far in the future. WordPerfect decided that the future was the web and they wanted in. They ported WordPerfect to Java and and published an applet. The applet was huge (at least 10's of MB), particularly so when fast internet access for most meant a 28.8k modem. After the excruciating wait for it to load, i…

Not really the same. WASM is part of the browser and an open web standard. It can be emulated entirely in JavaScript which comes with serious security guarantees.

Java applets are in the same category as ActiveX controls, which is basically hosting native code (with all the security issues that entails) in a DOM element.

Re: LibreOffice running natively in the browser via WebAssembly

#185

Note that it will download around ~300Mb of data directly to your browser, so it might take a bit to load from slow connections. Here's the related video from FOSDEM: https://fosdem.org/2022/schedule/event/lotech_lowa/

300 MiB. & … "a bit" — it takes nearly 20 seconds on "Gigabit" fiber. (312 MiB in 19.22s, or 136 Mbps.) Runs shockingly smoothly once it starts, though.

Running on an M1 Max and getting 5-10 fps. Not what i'd call smooth.

Re: LibreOffice running natively in the browser via WebAssembly

#186

I remember when LibreOffice was called Star Office and would run like molasses on a Celeron 300A OC to 450mhz machine. The office suite would take up most of the ram and eventually crash due to system resource exhaustion. Now we can run the whole thing in a browser like it's Minesweeper. Wow.

If minesweeper was a 300mb binary. Yes.

Re: LibreOffice running natively in the browser via WebAssembly

#187
post #171

Earlier quoted context omitted.

Define "this far". The toolchains for webassembly are still not trivial to use. I wish more work was done to support WASM, but it requires a lot of work from compiler developers, for each language backend, so it's still a lot of work. Not to mention that I have almost no clue how to debug a WASM build. WASM is clearly the future, but I don't think there is any company really spending money to write better WASM tools,…

Why is it against the interests of large tech companies? I get Apple, but Google is always pretty eager about the advancement of the web platform, see Chrome and Chrome OS.

Microsoft was once super scared of Java because it could have filled the role that WASM and desktop browser apps now try to break into. Microsoft tried EEE, but Sun bit back.

Re: LibreOffice running natively in the browser via WebAssembly

#188
post #171

Earlier quoted context omitted.

Define "this far". The toolchains for webassembly are still not trivial to use. I wish more work was done to support WASM, but it requires a lot of work from compiler developers, for each language backend, so it's still a lot of work. Not to mention that I have almost no clue how to debug a WASM build. WASM is clearly the future, but I don't think there is any company really spending money to write better WASM tools,…

Why is it against the interests of large tech companies? I get Apple, but Google is always pretty eager about the advancement of the web platform, see Chrome and Chrome OS.

Google is happy with most anything you do on the internet, as long as you do it in Chrome so they can watch.

Re: LibreOffice running natively in the browser via WebAssembly

#189
post #80

Wait... Isn't LO a Java application? Have we created a new way to shove Java into a browser, but this time with the JVM itself inside the browser ?

You don't need a JVM to run Java code in the browser since there's a VM already. There's TeaVM which compiles Java bytecode to WASM.

It's true, but it is a Java subset - not a complete Java SE.

Re: LibreOffice running natively in the browser via WebAssembly

#190
post #178

I started experimenting with Go-WASM recently and learnt that writing non-blocking code is very crucial, Timer even inside a Goroutine blocks & crashes WASM. Leading me to use unreliable JS timers(albeit mitigating it with a worker) and performing only non-blocking compute on WASM. Is this just a consequence of using Go for WASM(i.e. lack of WASM threads), What are people who built LibreOffice in WASM or Doom3 using?…

You may want to file a bug on Go - I believe goroutines should work, including swapping between them. The code is emitted in a form that allows that (switch-in-a-loop pattern). Another thing you can try is TinyGo, whch uses Asyncify (a general wasm transformation to allow blocking) for goroutines, https://twitter.com/TinyGolang/status/1461364896197578759 Doom3 uses Asyncify in some parts of the event loop, for simila…

You're right, I think I should file a bug.

The Go library I need(ebiten) isn't compatible with TinyGo, I did try it for the reason you mentioned and to reduce size.

> Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.

Thanks! That's what I wanted to know, So it's certainly possible to write asynchronous code using C++ and Rust.

Post reply on HN