Building42 / Telegraph

Secure Web Server for iOS, tvOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Low speed. Large image loads really slowly.

wojczitsu opened this issue · comments

In my app I serve temp directory which contains large images from camera roll and html file which displays these images using <img src='...'>. Loading of one image takes around 5s so it is really slow. Shouldn't it be fast while we're using local wifi ? Is there any way to speed it up?

How large are the images in MBs?

I've tested downloading a large image (16.4 MB) and it completed in 225 milliseconds:

photodownload

If you download a lot of images simultaneously you will probably run into problems though. The file handler in Telegraph is kinda basic at the moment. It will load the entire file in memory, then send it to the client.

To properly fix this I need to introduce proper streaming of the HTTPMessage body.
Work is quite busy at the moment, but I'll look into it when I have the time.

I'm closing this one, because it is similar to issue #27