-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Revise.revise()
is typically used in one of two ways:
- Called just before code is executed (non-change triggered)
- Called when files are modified (change triggered)
Revise.revise()
does a sleep(0.01) in either case
Line 751 in 13a5eb7
sleep(0.01) # in case the file system isn't quite done writing out the new files |
This is clearly a bit of a hack in the first place, but it does make sense that it might help for change triggered Revise. However, if Revise.revise()
is being run in a non-change triggered scenario, there is no reason to think 10ms from now is any better than now. Some non-change triggered uses of Revise, such as the REPL hook, mitigate this by guarding Revise.revise()
with isempty(revision_queue)
, however even if there are revisions, is there any reason to wait 10ms extra in this scenario? It's not so long, but latency adds up.
The simplest solution would be to add a flag e.g. Revise.revise(...; ... skip_sleep=false)
, and change all non-change triggered usages to set it to true.