Dash-iOS icon indicating copy to clipboard operation
Dash-iOS copied to clipboard

Feature request: Show docset size before download

Open mandeldl opened this issue 7 years ago • 6 comments

On iOS devices it'd be helpful to know in advance how large a docset is.

mandeldl avatar Aug 27 '17 15:08 mandeldl

@Kapeli Can we add a node or attribute to the xml of the each feed that give you the size?. After that it will be easy to add the file size to the app.

nexon avatar Jan 27 '19 20:01 nexon

@nexon Have you considered sending a HEAD request to the server requesting the archive and checking the Content-Length?

Kapeli avatar Jan 27 '19 20:01 Kapeli

@Kapeli Yes, but is not the best option here since you will need to send N request where N is the quantity of visible cells, in which case is a waste of resources.

Also you need to consider cancelling the request when the user press for downloading. Another problem is what happen with the request (HEAD) when the user scroll. Should be cancelled?, we should get a reference to the Feed Object when doing the request so we don't cancel it and we wait for the result and we put it in the Feed Object (we need to avoid leaking memory)?

nexon avatar Jan 27 '19 21:01 nexon

How would all this be different if you had an attribute in the XML itself?

Kapeli avatar Jan 27 '19 21:01 Kapeli

For main docsets and cheat sheets, maybe you can maintain an XML feed especially for the sizes of each docset and cheatsheet? For 3rd-party ones, maybe sizes can be integrated into the main feed.

stevapple avatar Jan 28 '19 09:01 stevapple

For main docsets I plan on moving to a JSON feed (like the cheatsheet one), which will include sizes. This won't come anytime soon though.

For cheatsheets I don't see a point in showing the size. All of them are less than 200 KB in size. Only LaTeX_Math_Symbols is 1.1MB.

Kapeli avatar Jan 28 '19 16:01 Kapeli