Skip to content

Commit

Permalink
Prepare for 0.5.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
groboclown committed May 11, 2015
1 parent 2e9c0ab commit 99485f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Cached the jobs loaded from the server.
* Added a monitor to track the number of actual server calls.
* Capped the number of simultaneous connections to the same server/workspace (2).
* Capped the frequency at which changelists will be refreshed (one per second).
* Capped the frequency at which changelists will be refreshed (once every two seconds).
This is due to editing files triggering a changelist refresh, which can become quite noisy.
* Bug fixes.
* Reduced the amount of log messages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class P4ChangeProvider implements ChangeProvider {
private static final Logger LOG = Logger.getInstance(P4ChangeProvider.class);

// TODO make configurable
private static final long MIN_REFRESH_INTERVAL_MILLIS = 1000;
private static final long MIN_REFRESH_INTERVAL_MILLIS = 2000;

private final P4Vcs vcs;
private long lastRefreshTime = 0L;
Expand All @@ -68,14 +68,16 @@ public void getChanges(VcsDirtyScope dirtyScope, ChangelistBuilder builder, Prog
}

// TODO change back to debug
LOG.info("start changelist refresh", new Throwable());
long currentTime = System.currentTimeMillis();
if (currentTime - lastRefreshTime < MIN_REFRESH_INTERVAL_MILLIS) {
LOG.info("skipping changelist refresh; previous refresh was too soon");
return;
}
lastRefreshTime = currentTime;

//LOG.info("start changelist refresh", new Throwable());
LOG.info("start changelist refresh");

// In the current thread, pull in all the changes from Perforce that are within the dirty scope, into
// the addGate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void refresh(@NotNull final Project project) {

public static void refreshLater(@NotNull final Project project) {
// TODO switch to debug
LOG.info("Refreshing changelist view", new Throwable());
LOG.debug("Refreshing changelist view", new Throwable());

ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
Expand Down

0 comments on commit 99485f4

Please sign in to comment.