OpherV / gitflow4idea

Git Flow Integration plugin for IntelliJ
Apache License 2.0
504 stars 139 forks source link

Fix performance issues in plugin #216

Closed bmwsedee closed 5 years ago

bmwsedee commented 5 years ago

As also stated in https://github.com/OpherV/gitflow4idea/issues/195 I noticed that the plugin had some performance issues, especially in larger multi-repository projects where all repositories make use of gitflow.

I made a number of improvements (at least I think they're improvements, but you'll have to agree of course):

  1. Caching the already-retrieved branches. Since the plugin updates the GitflowBranchUtil on every git-change anyway, these don't change anyway, so caching them locally saves some time
  2. Caching the prefixes found using the GitflowConfigUtil when figuring out if gitflow is even used in the project. This turned out to save a lot of time, as parsing the config-file apparently takes relatively long
  3. Creating the actual actions only once and have the actions themselves figure out if they need to be shown or not.

When you get to merging this I'll probably have to look into https://github.com/OpherV/gitflow4idea/pull/214 again as well, since the menu-options also make use of the RepoActions-class and determining whether or not to show the "Advanced"-options should probably be handled differently. Or the other way around of course, depending on which you want to merge first. Let me know what you think! :-)

OpherV commented 5 years ago

This is great! Thanks! I'll probably wrap up reviewing and merging #214 and then this one

avatarkava commented 5 years ago

@OpherV are there any remaining tasks on this or just waiting til you have a bit of time to complete testing/merging?

OpherV commented 5 years ago

@avatarkava It's just a matter of time unfortunately. I feel really bad for delaying so much with @bmwsedee 's great work but I've been swamped with personal life stuff and work so hoping to get to it soon.

OpherV commented 5 years ago

@bmwsedee Great job! Thank you!