Details
Description
The method Files.remove(final java.io.File file) has a cycle for trying to delete a file.
As Javadoc says, it was intended to re-try 50 times, with a delay of 100ms at each 10th attemp (implemented with 2 cycles, one inside another), but acctually it has a 100ms delay EACH time, because the sleep is inside the inner cycle. This produces a delay of 5 secs for each file, and if you have about 10 files it's a lot of time (about a minute).
In windows using a page that has a model with a list of FileUpload, it tries to delete the files each time it recovers the Page from PageStore, and (I dont know why) can't delete any of the files, resulting in the mentioned delay. (in linux it works without problem)
Besides the problem with windows locking the files, If the cycle works as intended (the sleep in the outer cycle), the problem will be smaller.