plugins: reduce config calls by saving and reusing values, misc performance tweaks. (#799)

* Save config values -- AgilityPlugin

* Static state value map

* Don't run area in the for loop

* Checking for bounds is enough for widget null check

* Cache font settings

* SAve config values -- AntiDragPlugin

* Save config values -- AoEPlugin

* Save config values -- AttackStylesPlugin

* Save config values -- BankPlugin

* Check if player is in kingdom

* Save hideAutoRetaliate -- AttackStylesPlugin

* Save config values -- BanListPlugin

* Save config values -- BarbaranAssaultPlugin

* Save config values -- BarrowsPlugin

* Checkstyle

* Move up updateConfig.java

* Save config values -- BlackjackPlugin

* Save config values -- BlastFurnacePlugin

* Save config values -- BlastMinePlugin

* Save config values -- BoostsPlugin

* Save config values -- CannonPlugin

* Fix bank plugin test

* Parallelize plugin loading

* Fix sidebar going AWOL

* Save config values -- ChatFilterPlugin

* Save config values -- ChatHistoryPlugin

* Save config values -- ChatNotificationsPlugin

* Save config values -- ChatTranslationPlugin

* Save config values -- ClanChatPlugin

* Save config values -- ClueScrollPlugin

* Cleanup CombatCounterPlugin

* Save config values -- CombatCounter

* Checkstyle

* Save config values -- CombatLevelPlugin

* Convert game thread events without mutable field to singletons

These should be safe to convert, events with mutable field should be checked

* Checkstyle

* Fix test

* Save config values -- CookingPlugin

* Save config values -- CorpPlugin

* SAve config values -- CoxPlugin

* Save config values -- DailyTasksPlugin

* Save config values -- DiscordPlugin

* Coxhelper checkstyle

* Save config values -- EquipmentInspectorPlugin

* SAve cofig values -- XpDropPlugin

* Save config values -- FairyRingPlugin

* Save config values -- FightCavePlugin

* Save config values -- FishingPlugin

* Save config values and refactor -- FlexoPlugin

* Save config values -- FlinchingPlugin

* Save config values -- FreezeTimersPlugin

* Save config values -- GpuPlugin

* Save config values -- GrandExchangePlugin

* Save config values -- GroundItemsPlugin

* Save config values -- GroundMarkerPlugin

* Save config values -- GroundMarkerPlugin

* Save config values -- HerbiboarPlugin

* Save config values -- HidePrayersPlugin

* Save config values -- HighAlchemyPlugin

* Save config values -- HunterPlugin

* Save config values -- BabyHydraPlugin

* Fix Flexo

* Checkstyle

* Save config values -- IdleNotifierPlugin

* Save config values -- ImplingsPlugin

* Save config values and cleanup -- InfernoPlugin

* Use EqualsAndHashCode for GroundMarkerPoint

* Save config values -- InterfaceStylesPlugin

* Save config values -- InventoryGridPlugin

* Save config values -- InventorySetupPlugin

* Checkstyle

* Save config values -- InventoryTagsPlugin

* Save config values -- InventoryViewerPlugin

* Save config values -- ItemChargePlugin

* Save config values -- ItemIdentificationPlugin

* Save config values -- ItemPricesPlugin

* Save config values -- ItemStatPlugin

* Save config values -- KeyRemappingPlugin

* Save config values -- KourendLibraryPlugin

* Save config values -- LearnToClickPlugin

* Save config values -- LizardmenShamanPlugin

* Save config values -- LoginScreenPlugin

* Cleanup LootAssistOverlay

* Remove unused LootAssistConfig

* Save config values -- LootTrackerPlugin

* Save config values -- MetronomePlugin

* Add border color ground items

* Save config values -- WorstPluginEverPlugin

* Fix inferno plugin

* Save config values -- MinimapPlugin

* Save config values -- MiningPlugin

* Save config values -- MotherlodePlugin

* Save config values -- MouseHighlightPlugin

* Save config values -- MTAPlugin

* Save config values -- MultiIndicatorsPlugin

* Save config values -- NightmareZonePlugin

* Save config values -- NpcIndicatorsPlugin

* Save config values -- NpcStatusPlugin

* Save config values -- NpcAggroAreaPlugin

* Save config values -- ObjectIndicatorsPlugin

* Save config values -- OpponentInfoPlugin

* Save config values -- PartyPlugin

* Save config values -- PerformanceStatsPlugin

* Save config values and cleanup -- PestcontrolPlugin

* Save config values , cleanup and refactor -- PileIndicatorsPlugin

* Save config values -- PlayerIndicatorsPlugin

* Save config values -- PlayerInfoPlugin

* Save config values -- PluginSorterPlugin

* Save config values -- PohPlugin

* Checkstyle

* Save config values -- PoisonPlugin

* Save config values -- PrayAgainstPlayerPlugin

* Save config values -- PrayerPlugin

* Save config values -- PrayerAlertPlugin

* Checkstyle

* Save config values -- PuzzleSolverPlugin

* Save config values -- PvpToolsPlugin

* Save config values -- PyramidPlunderPlugin

* Save config values -- RaidsPlugin

* Save config values -- ShortcutPlugin

* Save config values -- RaidsThievingPlugin

* Oopsie

* Save config values -- RegenMeterPlugin

* Save config values -- ReportButtonPlugin

* Save config values -- RunecraftPlugin

* Save config values -- RunedokuPlugin

* Save config values -- RunepouchPlugin

* Save config values -- SafeSpotPlugin

* Save config values -- ScreenshotPlugin

* Save config values -- ShiftWalkerPlugin

* Save config values -- SlayerPlugin

* Save config values -- SmeltingPlugin

* Save config values -- SpawnTimerPlugin

* Save config values -- SpellbookPlugin

* Save config values -- StatusBarsPlugin

* Save config values -- ThievingPlugin

* Checkstyle

* Cleanup Zulrah

* Save config values -- XpTrackerPlugin

* Save config values -- XpGlobesPlugin

* Save config values -- WorldMapPlugin

* Save config values -- TheatrePlugin

* Save config values -- TickTimersPlugin

* Save config values -- TileIndicatorsPlugin

* Save config values -- TimersPlugin

* Save config values -- TitheFarmPlugin

* Save config values -- TMorphPlugin

* Save config values -- WarIndicatorPlugin

* Save config values -- WhaleWatchersPlugin

* Save config values -- WildernessLocationsPlugin

* Save config values -- WintertodtPlugin

* Save config values -- WorldHopperPlugin

* Save config values -- WoodcuttingPlugin

* Cleanup

* Checkstyle

* Fix tests
This commit is contained in:
sdburns1998
2019-07-05 01:11:31 +02:00
committed by Lucwousin
parent 8f05c01618
commit 22914889aa
694 changed files with 9824 additions and 4525 deletions

View File

@@ -251,7 +251,7 @@ public abstract class RSActorMixin implements RSActor
{
client.getLogger().debug("You died!");
LocalPlayerDeath event = new LocalPlayerDeath();
LocalPlayerDeath event = LocalPlayerDeath.INSTANCE;
client.getCallbacks().post(event);
}
else if (this instanceof RSNPC)

View File

@@ -1094,14 +1094,14 @@ public abstract class RSClientMixin implements RSClient
@Inject
public static void canvasWidthChanged(int idx)
{
client.getCallbacks().post(new CanvasSizeChanged());
client.getCallbacks().post(CanvasSizeChanged.INSTANCE);
}
@FieldHook("canvasHeight")
@Inject
public static void canvasHeightChanged(int idx)
{
client.getCallbacks().post(new CanvasSizeChanged());
client.getCallbacks().post(CanvasSizeChanged.INSTANCE);
}
@Inject
@@ -1272,7 +1272,7 @@ public abstract class RSClientMixin implements RSClient
@Inject
public static void onUsernameChanged(int idx)
{
client.getCallbacks().post(new UsernameChanged());
client.getCallbacks().post(UsernameChanged.INSTANCE);
}
@Override
@@ -1515,7 +1515,7 @@ public abstract class RSClientMixin implements RSClient
@FieldHook("cycleCntr")
public static void onCycleCntrChanged(int idx)
{
client.getCallbacks().post(new ClientTick());
client.getCallbacks().post(ClientTick.INSTANCE);
}
@Copy("shouldLeftClickOpenMenu")

View File

@@ -496,7 +496,7 @@ public abstract class RSWidgetMixin implements RSWidget
client.getLogger().trace("Posting widget position changed");
WidgetPositioned widgetPositioned = new WidgetPositioned();
WidgetPositioned widgetPositioned = WidgetPositioned.INSTANCE;
client.getCallbacks().postDeferred(widgetPositioned);
}