tomason/anadix — Issue #46: Create Sources lazily
Author: triceo
Created: 2011-11-27 11:08:57+00:00
State: open

In the case of URLSource(), the contents of the URL are loaded immediately when the source is requested. This may be problematic as the application will block until the URL can be accessed, read and converted into text. It would be better if the resources were either:

a) read only when they're actually needed or
b) better still, read immediately on a background thread. (Using java.util.concurrent.Future could be ideal for this task.)

This way, the application doesn't block on any expensive IO unless it absolutely has to.