[bisq-network/bisq] Cache results of isFiatCurrency and isCryptoCurrency (#4955)

chimp1984 notifications at github.com
Wed Dec 16 01:10:57 CET 2020


@chimp1984 commented on this pull request.



> @@ -62,6 +62,14 @@ public static void setup() {
 
     private static String baseCurrencyCode = "BTC";
 
+    // Calls to isFiatCurrency and isCryptoCurrency are very frequent so we use a cache of the results.
+    // The main improvement was already achieved with using memoize for the source maps, but
+    // the caching still improves performance by about 20% for isCryptoCurrency and about 100%

Wording is a bit bad... old version consumes double the time so new version has a 100% improvement. 1777 ms vs 3467 ms. I will rephrase is....

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4955#discussion_r543779813
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201215/973d26a8/attachment.htm>


More information about the bisq-github mailing list