#Can I cache recipe changes/general KubeJS stuff somehow

58 messages · Page 1 of 1 (latest)

cobalt cave
#

I'm removing most blocks and items from vanilla mc along with removing all tags from those items (to make emi cleaner) but this makes loading worlds/reloading take a very long time. Was wondering if theres a way to cache this so it doesn't have to do it every time

past chasmBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

burnt dagger
#

you cant since those changes arent made directly on the mods

#

and reloading will reload the data from the mods, undoing your changes

#

besides this isnt impacting load times

#

like youre talking nanoseconds or at most milliseconds for a major pack's scripts

inner coral
#

You might be able to temporarily disable the recipe scripts while you’re working on these changes so that the recipe processor doesn’t trigger.

inner coral
reef swan
#

Would it be easier to filter everything then exclude certain stuff?

#

That might improve performance

burnt dagger
#

we're still talking about practically zero time...

reef swan
#

Not necessarily, I have noticed slight hitches on large packs with weak machines

#

But you're right that it shouldn't be too noticeable

burnt dagger
cobalt cave
burnt dagger
#

something smells 🐟

cobalt cave
#

if this doesn't affect your load times I assume you have a quantum computer

twin martenBOT
#

Paste version of message.txt from @cobalt cave

cobalt cave
#

and it's mainly this

e.removeAllTagsFrom(item)

causing it

burnt dagger
#

that list is triggering me

cobalt cave
#

😭

#

i had regex'd a lot of the stuff before but i like visually seeing everything

burnt dagger
#

A

cobalt cave
#

A

burnt dagger
#

i might actually test the load speed tomorrow out of curiosity

cobalt cave
#

it increases it by like 25x

burnt dagger
cobalt cave
#

ig removing every tag from every item is hard

inner coral
#

You could sort that array to make it easier to read lol

cobalt cave
#

the order is from /kjs dump_registry minecraft:item

reef swan
#

I can see an issue

#

Every time you loop through that array you're adding the whole array to the hidden items tag

cobalt cave
#

🤔

reef swan
#

Move that e.add() statement outside of the loop

cobalt cave
#

like into a seperate serverevents.tag?

reef swan
#

No, just outside the forEach

cobalt cave
#

ohhh

reef swan
#

It's in the loop at the moment

#

Which is not ideal

cobalt cave
#

trying rn

#

HOLY CHRIST

#

@reef swan ily

#

yea that completely fixed it😭

#

its back to taking like .3 seconds again

burnt dagger
reef swan
#

You were effectively looping through the entire array in the entire array

cobalt cave
#

😭 😭 😭

reef swan
#

Which made the performance exponentially worse

cobalt cave
#

yea got damn

#

well tysm ill close the ticket lmao

reef swan
#

Np!

#

Really.. on my screen that sent before the ticket was closed

#

Just reopen and close it so the ticket gets properly closed

cobalt cave
#

lmao alr