GithubHelp home page GithubHelp logo

Comments (4)

katowulf avatar katowulf commented on September 15, 2024

No idea, but firebase-util is not compatible with 3.x, see #96

from firebase-util.

katowulf avatar katowulf commented on September 15, 2024

Looks the same as #100.

from firebase-util.

md-rashid avatar md-rashid commented on September 15, 2024

also, not sure if it helps, but changing from $key to $priority or $name stops the error. However, after a certain limit array elements are replaced. so we keep getting new elements, but older ones are replaced.

from firebase-util.

md-rashid avatar md-rashid commented on September 15, 2024

So, while I do not have an answer for the first part of the question, based on the additional note, I have this fix:

var scrollRef = new firebase.util.Scroll(baseRef, '$priority', {maxCacheSize: 750, windowSize: 500});

Setting the maxCacheSize and windowSize to a higher value should solve the issue. As per documentation, if we exceed windowSize then the start of the array is trimmed to keep the size under limit.

Documentation:

Keys/values that can be passed via opts:

{int} windowSize: the maximum number of records to have loaded in the list at any given time. 3-5 times the size of the viewable window is a good optimization, depending on how fast content is scrolled and the payload of each record (i.e. how long it takes to download).
{int} maxCacheSize: in general, leave this as the default. This controls the internal cursor's cache, which is used to find the current position in the list. This controls how many keys it can load at any given time. This is, by default, three times the size of windowSize and should always be larger than windowSize.

from firebase-util.

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.