fuzetsu/manga-loader

MangaDex loading slow

metroid112 opened this issue · 9 comments

For some reason while using the script with MangaDex the pages are loading extremely slow, while if you browse the manga through normal means the loading is way faster.

Images are not loading slow.
Only the first two images are loading instead of the entire set of images.

image

For me it eventually loads them but I leave the tab open for a few minutes to do other stuff while I wait.

The guy who makes mangadex's config here, I tried to make my code more concise, yet the problem persist. IMO it loads the images one at a time because the script needs to load the viewer page for each image, and mangadex's viewer page is absurdly heavy to load. They designed the viewer page full of scripts, only swapping the current image element with next images so that the heavy load is only at the start. If we can directly load the image instead through the viewer page, it may be as fast as loading it through normal means. I'd say just use their normal viewer, we may not be able to be faster than theirs.

Yeah thankfully they implemented a webtoon-like viewer now so it's the best choice for now. It would be nice to improve the loading process but I guess we'll wait.

The problem with their viewer is that they are resizing the images pretty hard. It's extremely noticeable on wide/double pages.

So when manga-loader loads a page, does it run the page script? Can we disable that and just extract the elements we need from raw html?
cc: @fuzetsu

It shouldn't run the page's scripts, just parses the html content without loading anything, and even if the page is heavy it shouldn't be that much heavier than loading an image or something, the responses could be slow maybe.

The pages method can be used in an implementation to implement a custom way of loading the pages, so you could code it to preload everything instead of going sequentially, but I don't know if that would be the best solution.

So I noticed that the script loads faster now, coincidentally, they upgraded their servers. So we can conclude that it's not the script that loads slowly, but their server was slow anyway.

.org issue Fixed by #27 , slowdown is on their side.. thanks @kyuucr