Giter Club home page Giter Club logo

Comments (9)

kilbith avatar kilbith commented on May 26, 2024 1

fc2d2e5

Can you test please?
@pauloue Check it out, too.

from craftguide.

kilbith avatar kilbith commented on May 26, 2024 1

But I think it would be better to either not display these recipes at all or display them in a toggleable usages mode.

No, that sounds like a half-baked solution. Pretty sure there exists a better fix that lies in the code architecture and that does not involve any compromise.

from craftguide.

Wuzzy2 avatar Wuzzy2 commented on May 26, 2024

Works fine, thank you!

from craftguide.

kilbith avatar kilbith commented on May 26, 2024

Unfortunately this commit causes a serious performance regression also...

from craftguide.

p-ouellette avatar p-ouellette commented on May 26, 2024

It would be faster if you only get the usages if it's a fuel and there are no regular recipes. But I think it would be better to either not display these recipes at all or display them in a toggleable usages mode.

from craftguide.

p-ouellette avatar p-ouellette commented on May 26, 2024

I don't consider it a compromise. Performance issues aside, I think the current behavior of falling back to usages when there are no recipes is confusing because clicking on some items gives you usages while the rest give you recipes. It's also weird that this fallback is used only for fuel items and not other items that have usages but no recipes (e.g. default:key).

from craftguide.

kilbith avatar kilbith commented on May 26, 2024

For info, this commit drastically improves the performance of get_filtered_items.

from craftguide.

p-ouellette avatar p-ouellette commented on May 26, 2024

It did for me too and I was really confused as to why because it doesn't seem to change anything performance critical. So I reverted it and the performance improvement was still there. I think I know what was going on. Previously there was a bug that caused duplicate items to be added to inv_items, making the craftguide slower every time I opened it. That bug was since fixed, but the inv_items meta was never cleared, so the performance remained bad. Then when testing I cleared it and the performance was fixed.

Caching usages does make a noticeable difference when there is a ridiculous amount of registered items (dreambuilder) though.

from craftguide.

kilbith avatar kilbith commented on May 26, 2024

Talking about dreambuilder, caching all recipes/fuels/usages takes 55 seconds (<0.2s with MTG only).

from craftguide.

Related Issues (20)

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.