Community
Participate
Working Groups
Make the TaskReviewMappingStore serialize all mappings to disk using JSON.
New Gerrit change created: https://git.eclipse.org/r/60754
New Gerrit change created: https://git.eclipse.org/r/60862
New Gerrit change created: https://git.eclipse.org/r/61096
New Gerrit change created: https://git.eclipse.org/r/61495
Blaine, I think I owe you an apology. You've implemented exactly what I asked for here, but now that I have the implementation in front of me I'm realizing my design for this wasn't the best. I think we can simplify the persistence by storing the URL of each review's associated task as an attribute on the review's ITask rather than writing JSON files to disk. At startup, instead of reading in a lot of JSON files to construct the mapping, we can build the Mulitmap from [task URL] to [list of review URLs] just by iterating over all reviews in the task list. This will have a number of benefits: * we don't need to keep a second map for the reverse mapping from reviews to tasks, because given a review we can just get the task URL from the ITask * we don't need to worry about serialization and deserialization, or scheduling too many jobs * the ReviewConnector can put the task URL in the ITask in updateTaskFromTaskData, so that your listener doesn't have to load the task data or do the URL parsing. This would be better for performance because the listener gets called many times each time a task changes. I've pushed a review to show you what I mean. It probably needs a few null checks and the tests need to be updated. Can you take a look? 61495: 482534: [UCOSP] store task review mapping using on review ITasks [I621893f4] https://git.eclipse.org/r/#/c/61495/
(In reply to comment #5) > * the ReviewConnector can put the task URL in the ITask in > updateTaskFromTaskData, so that your listener doesn't have to load the task data > or do the URL parsing. This would be better for performance because the listener > gets called many times each time a task changes. This isn't quite right. updateTaskFromTaskData gets called the same number of times as the listener, the difference is that it already has the task data from the connector, so we aren't loading it from disk over and over again.
Gerrit change https://git.eclipse.org/r/61495 was merged to [master]. Commit: http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.reviews.git/commit/?id=7ec7690d253aeafe01625501da8c054cbabbae33