Code Monkey home page Code Monkey logo

Comments (2)

lentinj avatar lentinj commented on September 27, 2024

The above commit gets rid of my populate_ott_name_map bodge that started this issue, and setting detail_fetched instead, but the rest of the points here still stand. ott_name_map is pretty likely useless.

from oztree.

lentinj avatar lentinj commented on September 27, 2024

This was an interesting thread to pull. There were 2 cases where ott_name_map came into play:

  • On leaping to search results, we didn't wait to fetch details first. The search results were stuffed into ott_name_map so at least the node names were available
  • On tree startup, node metadata could be fetched, but details_fetched wasn't set. We refuse to return the metadata in this case, but ott_name_map doesn't have similar qualms. I haven't discovered entirely why this would be the case, but checking if the metadata is available (array lookup) isn't dramatically more expensive than checking details_fetched.

id_ott_map has become redundant in exactly the same way, so gotten rid of that as well.

Generally, I suspect everywhere details_fetched touches could do with a rethink.

  • Cache a reference to data_repo.metadata.leaf_meta[this.metacode] rather than caching metadata in the midnode object. Things like get sponsor_name() just become an alias to get_metadata.
  • Push any modification of cached values (e.g. capitalizeFirstLetter) further upstream, at least to the metadata-parsing.

I wouldn't be surprised if it evaporates. But this is probably enough wild refactoring for today.

from oztree.

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.