SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.83k stars 94 forks source link

Disable startup webcord splash screen #531

Open kchousos opened 3 months ago

kchousos commented 3 months ago

Description

It adds another unnecessary delay to access the user interface.

Suggestions

Offer a flag or settings option to disable the startup webcord splash screen.

Alternatives

No response

Additional Context

No response

SpacingBat3 commented 3 months ago

I think I could try to improve it...

It serves quite important purpose: it is a confirmation that WebCord is indeed loading itself and that stuff is happening. Without that, users would just end up with the empty window, and that indicated dozens of things in the past.

I think I've previously wanted to implement it via BrowserViews so it can be displayed on top of the Discord (right now, I rely on a trick applied in Electron which displays the previous site until the next one declared that it finished to load, which is imperfect in case of Discord, due they do actually load more stuff after that happens), but those were quite buggy... They still might be in fact, although I think I found a workaround to make them render properly.

SpacingBat3 commented 3 months ago

Also about this:

It adds another unnecessary delay to access the user interface.

This is only partially true, there's a small delay added only for the animation to finish (so this is more a cosmetic thing, to make things looks smoothly)... Although, this wouldn't have to be the case if I could just display the splash screen on top of the Discord page or somehow tinker with Electron so it won't display Discord page too early.

The delay it introduces shouldn't be that bad tho (around 1,5s or less if I remember correctly; I still might take some efforts to entirely eliminate it), WebCord should still load way faster than official Discord client 😛️.

kchousos commented 3 months ago

WebCord should still load way faster than official Discord client

I haven't found this to be the case. Discord and Webcord load at about the same time for me, with Webcord being slower to open due to the splash.

SpacingBat3 commented 1 month ago

I haven't found this to be the case. Discord and Webcord load at about the same time for me, with Webcord being slower to open due to the splash.

I'll probably should re-design the whole loading of the webpages and splash thing, since the whole code and past implementations that were kinda failure (e.g. due to many bugs in the BrowserView API) are quite outdated given Electron has now quite a number of new APIs that separates content loading to windows and allows for way greater control with that.

I still don't think WebCord loads (or should load) slower, since there's very little tasks done compared to Discord, which is even more complex and modularized to WebCord; unlike to Discord, WebCord doesn't need to wait for updates or check them for multiple components, and it also loads from a single file if you consider app.asar as such (which could reduce the FS overhead I suppose, at least from what I remember around the reasoning of packing app to it, I think that was mostly pointed out for Windows) while Discord does and implements way more stuff, including native modules.