jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.06k stars 215 forks source link

Using Dropbox FS in Browsix Latex Editor makes large number of API calls #180

Closed nidhimundra closed 7 years ago

nidhimundra commented 7 years ago

Using Dropbox FS in Browsix latex editor tries to fetch all the latex files from Dropbox, and subsequently, generates a large number of API calls. The average network time of these comes around ~100ms, but some are really quick (~7 ms) and, some are too slow (~500 ms). Is there any way to avoid it from fetching these files from Dropbox?

screen shot 2017-06-14 at 4 31 54 pm

jvilk commented 7 years ago

Not that I know of. If LaTeX reads the file foo.tex, then the Dropbox FS will read foo.tex from Dropbox.

There's some basic caching in the Dropbox FS, but it still needs to check in with the Dropbox server to see if the file has changed.

nidhimundra commented 7 years ago

Yes, I am storing the .tex files and .bib files on Dropbox, but from where is it fetching other files of pdflatex? Is it trying to fetch those as well from Dropbox?

jvilk commented 7 years ago

That depends on your configuration of BrowserFS. Without seeing the code, I can't answer that question. Is your code available somewhere?

nidhimundra commented 7 years ago

You can find my code at https://github.com/nidhimundra/browsix/blob/dropbox-fs-support/examples/latex-editor/app/scripts/main.js#L8 and https://github.com/nidhimundra/browsix/blob/dropbox-fs-support/src/kernel/kernel.ts#L2537

jvilk commented 7 years ago

DropboxFS is working as intended.