I am on Play Framework 2.5.14, with a game for java.
I have a Service that downloads and processes some data, and it takes a lot of time to process this data.
I do like this:
Controller
public Result showData() { List<Data> data = service.getProcessedData(); return ok(views.html.data.render(data)); }
View
@(data: List[Data])
But when I go to the page, it lasts a long time because service.getProcessData() takes too much time. When the function is completed, then the view is visualized.
I need the view to load and when the data is ready, fill out the view.
source share