lazy file loading - how's it being used?

89 views
Skip to first unread message

Anthony Pesch

unread,
Jul 19, 2013, 12:50:54 AM7/19/13
to emscripte...@googlegroups.com
Hey guys,

I've been doing a fair amount of work with the filesystem layer in emscripten lately and I was wondering if anyone is making heavy use of the current lazy file loading with createLazyFile and if so, what's the use case?

I know I'd originally used it to get my quake engine port up off the ground. However, as the data grew, sync XHR request quickly became problematic (unresponsive script warnings, couldn't update the UI, etc.). In the end I had to async load all of my data from a CDN and manually populate the filesystem at load.

With that said, for large data it doesn't really seem like a good solution (unless perhaps you're using it in the context of a WebWorker?), and if you're not needing to load large amounts of data, it seems it'd be sufficient to preload the data needed for the application with emscripten's file packager.

Anyways, I currently feel the functionality could stand to be deprecated, but I wanted to query and see how it's actually being used first.

Cheers,
Anthony

Anthony Pesch

unread,
Aug 10, 2013, 2:11:54 AM8/10/13
to emscripte...@googlegroups.com
Alon,

Would it be OK to go ahead and deprecate this functionality? If so, is there any sort of standard procedure or should I just print a warning with a little info and perhaps a link to this discussion?

 - Anthony

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alon Zakai

unread,
Aug 11, 2013, 1:47:27 PM8/11/13
to emscripte...@googlegroups.com
Does deprecating it simplify future work in some way, or provide another benefit?

The one use case I am interested in here is web workers, some day when more APIs are available in them it will be interesting to run entire apps in workers, in which case load on demand of files would be useful.

- Alon

Anthony Pesch

unread,
Aug 11, 2013, 1:52:21 PM8/11/13
to emscripte...@googlegroups.com
It's just hacked in there now, and doesn't seem to be heavily used.

I think if we wanted to use it for that, we should create an HTTPFS to mount up for use in the workers.

 - Anthony

Anthony Pesch

unread,
Aug 11, 2013, 1:56:41 PM8/11/13
to emscripte...@googlegroups.com
(so in other words, I guess there is no real net benefit, and we should probably just leave it in for now)

Alon Zakai

unread,
Aug 11, 2013, 9:02:33 PM8/11/13
to emscripte...@googlegroups.com
I agree it is kind of hacky, but if there isn't a concrete reason to remove it, let's leave it in and perhaps someday improve it to be less of a hack.

- Alon

Reply all
Reply to author
Forward
0 new messages