← Back to team overview

dhis2-devs team mailing list archive

import thread

 

One of the difficulties of providing good user feedback on import is
the that we spawn an extra thread to do the actual importing and we
don't have very sophisticated inter-thread communication with that
worker beyond the "status message" which is a transient thing.  And
better logging is not a substitute for user feedback.

Is there a really compelling reason to spawn this extra thread?  Doing
the import synchronously (in the same thread as the action) would make
it much simpler to provide progressive and useful feedback to the
user.  There is a general principle in UI design that you want to keep
the UI responsive during long-running operations but I am not sure
that should necessarily be the case here.  It's more important to have
better feedback and you actually want the user to wait until the
process is complete.  Of course this can be done between two threads
but it seems kind of unnecessary - and anyway the assumption would
still be that the user does not navigate away from the page while the
import is continuing.  Does anyone have an opinion?

The other alternative would be to progressively build up (and store?)
a report of happenings during the import process and allow the user to
browse back through previous imports.  This can be nice but more
complex than just running a synchronous thread.

Bob


Follow ups