Page 1 of 1

Are there any instance can be disabled to reduce loading?

Posted: Thu Oct 25, 2012 4:53 am
by chuong2a
Are there any instance can be disabled to reduce game server loading time?
I have tried to disable some getInstance() function in gameserver code, and I get error...
Here is the path: L2J_Server \ java \ com \ l2jserver \ gameserver \ GameServer.java

Code: Select all

         printSection("Skills");        EffectHandler.getInstance().executeScript();        EnchantGroupsData.getInstance();        SkillTreesData.getInstance();        SkillTable.getInstance();        SummonSkillsTable.getInstance();                printSection("Items");        ItemTable.getInstance();        EnchantItemData.getInstance();        SummonItemsData.getInstance();        EnchantHPBonusData.getInstance();        MerchantPriceConfigTable.getInstance().loadInstances();        TradeController.getInstance();        MultiSell.getInstance();        //  RecipeData.getInstance();        ArmorSetsData.getInstance();        //  FishData.getInstance();        //  FishingMonstersData.getInstance();        //  FishingRodsData.getInstance();        HennaData.getInstance();                printSection("Characters");        ClassListData.getInstance();        InitialEquipmentData.getInstance();        ExperienceTable.getInstance();        HitConditionBonus.getInstance();        CharTemplateTable.getInstance();        CharNameTable.getInstance();        LevelUpData.getInstance();        AdminTable.getInstance();        //  RaidBossPointsManager.getInstance();        PetDataTable.getInstance();        CharSummonTable.getInstance().init();                printSection("Clans");         ClanTable.getInstance();        //  CHSiegeManager.getInstance();        //  ClanHallManager.getInstance();        //  AuctionManager.getInstance();                printSection("Geodata");        GeoData.getInstance();        if (Config.GEODATA == 2)            PathFinding.getInstance();                printSection("NPCs");        //  HerbDropTable.getInstance();        NpcTable.getInstance();        NpcWalkerRoutesData.getInstance();        WalkingManager.getInstance();        StaticObjects.getInstance();        ZoneManager.getInstance();        DoorTable.getInstance();        //  ItemAuctionManager.getInstance();        //  CastleManager.getInstance().loadInstances();        //  FortManager.getInstance().loadInstances();        NpcBufferTable.getInstance();        SpawnTable.getInstance();        //  HellboundManager.getInstance();        //  RaidBossSpawnManager.getInstance();        DayNightSpawnManager.getInstance().trim().notifyChangeMode();        //  GrandBossManager.getInstance().initZones();        //  FourSepulchersManager.getInstance().init();        //  DimensionalRiftManager.getInstance();        //  EventDroplist.getInstance();                printSection("Siege");        //  SiegeManager.getInstance().getSieges();        //  FortSiegeManager.getInstance();        //  TerritoryWarManager.getInstance();        //  CastleManorManager.getInstance();        //  MercTicketManager.getInstance();        //  L2Manor.getInstance();                printSection("Olympiad");        //  Olympiad.getInstance();        //  Hero.getInstance();                // Call to load caches        printSection("Cache");        HtmCache.getInstance();        CrestCache.getInstance();        TeleportLocationTable.getInstance();        UITable.getInstance();        PartyMatchWaitingList.getInstance();        PartyMatchRoomList.getInstance();        //  PetitionManager.getInstance();        HelperBuffTable.getInstance();        //  AugmentationData.getInstance();        //  CursedWeaponsManager.getInstance();                printSection("Scripts");        QuestManager.getInstance();        //  TransformationManager.getInstance();        //  BoatManager.getInstance();        //  AirShipManager.getInstance();        //  GraciaSeedsManager.getInstance();                try        {            _log.info("Loading Server Scripts");            File scripts = new File(Config.DATAPACK_ROOT, "data/scripts.cfg");            if(!Config.ALT_DEV_NO_HANDLERS || !Config.ALT_DEV_NO_QUESTS)                L2ScriptEngineManager.getInstance().executeScriptList(scripts);        }        catch (IOException ioe)        {            _log.severe("Failed loading scripts.cfg, no script going to be loaded");        }                QuestManager.getInstance().report();        //  TransformationManager.getInstance().report();                if (Config.SAVE_DROPPED_ITEM)            ItemsOnGroundManager.getInstance();                if (Config.AUTODESTROY_ITEM_AFTER > 0 || Config.HERB_AUTO_DESTROY_TIME > 0)            ItemsAutoDestroy.getInstance();                MonsterRace.getInstance();                //  SevenSigns.getInstance().spawnSevenSignsNPC();        //  SevenSignsFestival.getInstance();        AutoSpawnHandler.getInstance();        AutoChatHandler.getInstance();  

Re: Are there any instance can be disabled to reduce loading

Posted: Thu Oct 25, 2012 2:22 pm
by Zoey76
This are singleton classes, mostly, so you can remove pretty much everythimg, and they will be loaded, when, if they are called, but you could get some errors, just test.