mirror of
https://github.com/correl/mage.git
synced 2024-12-01 03:00:09 +00:00
Disabled cards rating and classes preloading on startup (lags problem);
This commit is contained in:
parent
e285b2770d
commit
c29b68f030
3 changed files with 9 additions and 3 deletions
|
@ -216,7 +216,9 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}
|
||||
|
||||
RepositoryUtil.bootstrapLocalDb();
|
||||
RateCard.bootstrapCardsAndRatings();
|
||||
if (RateCard.PRELOAD_CARD_RATINGS_ON_STARTUP) {
|
||||
RateCard.bootstrapCardsAndRatings();
|
||||
}
|
||||
ManaSymbols.loadImages();
|
||||
Plugins.instance.loadPlugins();
|
||||
|
||||
|
|
|
@ -137,8 +137,10 @@ public final class Main {
|
|||
logger.info("Done.");
|
||||
|
||||
// cards preload with ratings
|
||||
RateCard.bootstrapCardsAndRatings();
|
||||
logger.info("Done.");
|
||||
if (RateCard.PRELOAD_CARD_RATINGS_ON_STARTUP) {
|
||||
RateCard.bootstrapCardsAndRatings();
|
||||
logger.info("Done.");
|
||||
}
|
||||
|
||||
logger.info("Updating user stats DB...");
|
||||
UserStatsRepository.instance.updateUserStats();
|
||||
|
|
|
@ -30,6 +30,8 @@ import java.util.*;
|
|||
*/
|
||||
public final class RateCard {
|
||||
|
||||
public static final boolean PRELOAD_CARD_RATINGS_ON_STARTUP = false; // warning, rating and card classes preloading can cause lags for users with low memory
|
||||
|
||||
private static Map<String, Integer> baseRatings = new HashMap<>();
|
||||
private static final Map<String, Integer> rated = new HashMap<>();
|
||||
private static boolean isLoaded = false;
|
||||
|
|
Loading…
Reference in a new issue