Coder Social home page Coder Social logo

shadowrs / minecraft-fabric-loader-benchmark-visualizer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 46 KB

A visualizer for the Loading Phases of the Fabric-Loader for Minecraft

License: MIT License

HTML 100.00%
fabric fabric-loader minecraft modding tool visualizer

minecraft-fabric-loader-benchmark-visualizer's Introduction

Fabric-Loader Loading Phases Visualizer for Minecraft

A plain-javascript single-page tool which parses the log4j formatted /log/debug.log file from a Minecraft Modpack. Based on the timestamps of various key log messages, calculates the time between phases and displays it on a bar graph.

alt

Give it a go using a dummy debug.log

Supplying your own debug.log

This tool requires some log messages not present in main Fabric repo. To run this tool on your own debug.log, you must use PolyMC or the MultiMC Launcher to run Minecraft with a replacement Fork of Fabric-Loader and Mixin repos.

  • On the Launcher UI, click Customize > Edit Instance > Select Fabric Loader > Edit. alt
  • This opens C:\Users\xx/AppData\Roaming\PolyMC\instances\All of Fabric 5 - AOF5 - 1.18.2\patches/net.fabricmc.fabric-loader.json in a text editor.
  • This file allows you to provide overrides for fabricMC's jars with Forks
  • Change the fabric-loader and sponge-mixin sections to point to the maven URL below.
        {
            "name": "net.fabricmc:sponge-mixin:0.11.4+mixin.0.8.5-local",
            "url": "https://repo.repsy.io/mvn/tardisfan/uno/"
        },
        {
            "name": "net.fabricmc:fabric-loader:0.14.8+local",
            "url": "https://repo.repsy.io/mvn/tardisfan/uno/"
        }
  • Modify launch options to include Java args: -Dfabric.log.debug.level=DEBUG -Dfabric.log.level=DEBUG

  • Optionally, if compatible with the mods in the modpack you're going to run, manually add the DashLoader mod to launch x2 faster. DashLoader replaces some of the last Minecraft phases of loading (related to models) with heavily optimized caching.

How it works

A simple string.contains() is performed on every line of the log. Patterns of unique log messages to matches are in messagesToMatch in index.html. The timestamp of each log message is parsed. All matches are sorted by timestamp, and the duration of each phase is nextPhase.start - thisPhase.start

Overview of Loading Phases

In order of execution:

Knot#init - preLaunch triggers mixin scanning. During classLoading of mixin classes, transformers are triggered:

MixinEnviroment constructor

MixinProcessor#applyMixins -> selectConfigs > prepareConfigs > postInit

Hooks#startClient

Minecraft blockstate, models, texture loading - this phase is a good 45% of the entire loading process. DashLoader mod replaces this entire phase with an alternate process which takes under 5 seconds!

The other largest chunk- 35% of loading time - is mixin transformers. Can this be cached or parallelized? QuiltMC's Chasm project aims to achieve that, and Fabric has wanted to approach this concept for a long time. discord message link

Thanks to

alt-text for the graph generation.

alt-text for date timestamp parsing.

minecraft-fabric-loader-benchmark-visualizer's People

Contributors

shadowrs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.