From 204f4a968586563c090874af57725c6f78dc80f3 Mon Sep 17 00:00:00 2001 From: RobinWeymans Date: Sat, 17 Jun 2017 03:15:03 +0200 Subject: [PATCH] Moved configuration web request to another thread (#85) * Moved configuration web request to another thread Fixes the FPS drop when spam clicking a config checkbox. Changed logging back to the original I was playing around with how i should write the Runnable, and accidently replaced the sl4j logging. --- .../runelite/client/config/ConfigManager.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java index 4631106dcd..c0a077d0b2 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java @@ -230,14 +230,19 @@ public class ConfigManager if (client != null) { - try + Runnable task = () -> { - client.set(groupName + "." + key, value); - } - catch (IOException ex) - { - logger.warn("unable to set configuration item", ex); - } + try + { + client.set(groupName + "." + key, value); + } + catch (IOException ex) + { + logger.warn("unable to set configuration item", ex); + } + }; + RuneLite.getRunelite().getExecutor().execute(task); + } try