From 99485f4db2a7eb744b2d7305014131cfad22cafb Mon Sep 17 00:00:00 2001 From: Groboclown Date: Mon, 11 May 2015 11:05:12 -0500 Subject: [PATCH] Prepare for 0.5.2 release. --- CHANGES.md | 2 +- .../net/groboclown/idea/p4ic/changes/P4ChangeProvider.java | 6 ++++-- .../idea/p4ic/changes/P4ChangesViewRefresher.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 21ed052d..66a33e69 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangeProvider.java b/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangeProvider.java index 97513789..eb4204e7 100644 --- a/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangeProvider.java +++ b/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangeProvider.java @@ -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; @@ -68,7 +68,6 @@ 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"); @@ -76,6 +75,9 @@ public void getChanges(VcsDirtyScope dirtyScope, ChangelistBuilder builder, Prog } 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. diff --git a/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangesViewRefresher.java b/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangesViewRefresher.java index 29f9b5c7..65e3c0bd 100644 --- a/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangesViewRefresher.java +++ b/plugin/src/net/groboclown/idea/p4ic/changes/P4ChangesViewRefresher.java @@ -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