Comments (13)
After doing some research apparently getCanonicalPath
is very slow on Windows. I will have to write some mixins to strip it out of the resource pack handling code. Are there other resource loading mods commonly used besides BASE and Resource Loader?
from vintagefix.
Those are the only two I'm aware of, so it'll probably need further testing/profiling later.
from vintagefix.
Load My Resources exists, iirc
from vintagefix.
How is performance with the latest commit?
from vintagefix.
The performance is definitely better and the profiling seems to indicate that getCanonicalPath
is no longer an issue. However, there are still consistent dips in performance when loading items, most noticeably from vanilla and ContentTweaker. Here's some new reports, this time with ResourceLoader back in. Still using same modpack Meatballcraft for the first 3 profiles:
- Profile for vanilla items when they are (re)loaded
- Profile while scrolling through all other items (noticeably slow at ContentTweaker items)
- Profile while scrolling through only ContentTweaker (CT) items. This is with LibNine/FluidDrawers disabled to isolate the issue a bit more.
- Another profile for vanilla items, this time in E2EU
It seems like BASE is no longer an issue, and ResourceLoader is better, but from it NormalResourceLoader.getInputStream
still accounts for a sizable amount of time (Can especially see this in the third profile). In fact, I'm not sure how ResourceLoader takes up so much time when viewing CT items considering CT textures don't need ResourceLoader to load.
Other observations are a) AbstractResourcePack.locationToName()
uses String.format()
, which I think can be improved by using concatenation/StringBuilder
instead? and b) throwing FileNotFoundException
seems to take up some time.
LibNine/FluidDrawers, AE2, and Chisel adds model loaders, which makes the performance impact add up further.
One last thing I've noticed is that it seems like browsing through the creative tabs doesn't have this performance impact that HEI has? I'm not sure if it's because of the different way the items are displayed, but I thought that was odd.
from vintagefix.
In fact, I'm not sure how ResourceLoader takes up so much time when viewing CT items considering CT textures don't need ResourceLoader to load.
ResourceLoader's pack might take priority over BASE; they both basically do the same thing.
One last thing I've noticed is that it seems like browsing through the creative tabs doesn't have this performance impact that HEI has? I'm not sure if it's because of the different way the items are displayed, but I thought that was odd.
Creative tabs display far less models on screen at once which puts a lot less pressure on the model system.
from vintagefix.
I've made some improvements to locationToName
. Keep in mind this is probably not going to ever be fully fixed because Windows file IO is just slow in general - launch times are universally faster on Linux from my testing. But I will see how much I can mitigate it.
from vintagefix.
That's understandable, I would say the game is pretty playable, considering it's now only really noticeable with CT and vanilla textures. I figured I would just follow up to report my findings. Anyways, thanks for all the great work on this mod and your other mods!
from vintagefix.
Can you try the latest build?
from vintagefix.
Looks like latest build fixes the performance issues! HEI is very smooth now, profile here.
One last thing that I completely missed earlier, something from commit ea6cca8 causes CustomMainMenu/ResourceLoader to not load images on the main menu correctly.
latest.log from latest build
from vintagefix.
I am pretty sure this is a Meatballcraft issue. It seems to happen on Linux even without VintageFix. Custom Main Menu tries to load a texture by the name menu:meatball.png
(because the texture is converted to a resource location internally, which forces it to lower case) but the actual texture on disk is menu:Meatball.png
, so it is not found. I suspect this is normally not noticeable on Windows as the canonicalization (which is what I removed) will sometimes silently correct these issues.
To be clear it is not safe to assume the OS ignores the case of files and Meatballcraft should probably rename this to be lowercase.
from vintagefix.
Got it, that indeed seems to be the case as editing the png to be all lowercase has fixed it. Didn't know about the canonicalization part for Windows. Sorry for reporting it on your side!
from vintagefix.
Good to hear; will close as I think my hack of baking all the item models ahead of time has solved the original problem.
from vintagefix.
Related Issues (20)
- Buildcraft compatibility issue
- Crash on Launch with Advanced Rocketry + Fusion + Chisel HOT 1
- Actions build crash rendering Fairy Lights & Ender IO content HOT 4
- Freeze on exit singleplayer world HOT 5
- Fancier Block Particle Crash HOT 4
- Crash with InGame Info XML HOT 1
- MalformedJsonException: Unterminated object at line 4 column 3 path $.animation.interpolate HOT 1
- [Suggestion] Option to supress "normal" errors in log HOT 2
- Toggle/load, shaderpacks crash. HOT 1
- "mixin.textures" causes most textures to break when installed alongside lwjgl3ify HOT 1
- Mention MixinBooter o n VintageFix front page HOT 1
- Some Falling Leaves incompatibilities
- [Bug] Can't render GregTechCEu lamp blocks in inventory when Connected Textures Mod is present
- crash HOT 1
- Missing textures in Redstone Control circuit editor
- Crash on startup on FTB Revelation HOT 1
- debug.log ERROR: `[VintageFix]: Error accessing resource pack on classpath`
- Techguns Missing textures HOT 1
- FermiumaASM + ViF = BOP's Seasonal Leaves odd rendering.
- `InvalidInjectionException: @Redirect annotation on checkThreadStatus could not find any targets matching 'initiateShutdown'` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vintagefix.