You can try the consumer manufacturerโs model to move around the schedule - but with some changes from the clean model:
- Reading and writing to the queue in blocks, and not in an element at a time, also update
visited , installed in blocks. This will save you time synchronization, which will be necessary to perform less often. - When you change the queue (and the
visited set), you must do extra work to make sure that you are not adding data that has already been visited since the last installed set.
Please note that with this approach, you are likely to search several vertices several times, but you can associate it with the frequency at which the queue and visited are updated.
Is it worth it? It is difficult to say in these things - it depends on many things (schedule structure, size, queue implementation, ...).
You should run some tests and try to fine tune the "how often to update" parameter and check what is better empirically. You should use statistical tools (the wilcoxon test is usually facto for this) and determine if the other is better than the other.
source share