refactor file history lookup into AsyncFileLogJob
followup on #841
The idea is to abstract the job of fetching the revlog commits touching the file in question and parallelise this with look up of the commits that match to figure out what was the subject line,author... and the file modification type. right now this is all happening in the application level code which is not ideal and harder to unittest.
The simple solution is to build this in phases: 1) revlog 2) commit Infos 3) diffs (for the modification type) The downside of this approach is: we only all all the information of the file log once everything is done and not in iterative batches.
The more complex but nicer solution: The AsyncJob spawns another Thread-Worker. While the AsyncJob does the revwalk we send every commitId we find to match into a queue and the Worker picks it up and does the info and diff lookup. As soon as the worker is done with one CommitId this will popup right away in the file history list. This should give a very reactive and fast feeling.
@cruessler what do you think?
@extrawurst I think the second option sounds like it gives the best user experience. Is something like this already implemented somewhere so that it could serve as a starting point?
you can checkout the other examples of the AsyncJob being implemented. none of them is spawning a child thread though but that should not be much more complicated. think you want to try it? I can help you once you have a draft
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
I’ve started addressing the issue in #1267.
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.