Giter VIP home page Giter VIP logo

Comments (4)

Sameesunkaria avatar Sameesunkaria commented on June 7, 2024 1

@shuoli84 If the diffing does not take that long (from the reference point of a user, approx. less than 500ms), you can perform the diffing on the background thread. Anything larger, DifferenceKit or any other diffing approach might not help you. Back to calling performBatchUpdates!

Also, if you don't want all the dataset in memory, again DifferenceKit might not be what you're looking for. Diffing requires that all the elements be compared and then a determination is reached on the outcome of the differences. Unless you have someway of performing comparisons (==) without hitting anything that is not in memory, you might be fine. The same goes for Hashes. If you are hitting the storage device or the network to fetch and compare the results, it'll be too slow to be of any advantage.

from differencekit.

shuoli84 avatar shuoli84 commented on June 7, 2024

@Sameesunkaria Thanks for the reply. I'm thinking of a solution kinda like:

  • Section info can be maintained in db, and small enough to load into memory.
  • Each section has a version to indicate whether modified.
  • When data changed, changeset can be computed from section info stored in db, and when load each item, a db lookup or just read cache.

from differencekit.

Sameesunkaria avatar Sameesunkaria commented on June 7, 2024

@shuoli84 That should work. The comparisons can be made on the version number/identifier. And for the difference identifier, a primary key can also be stored in the section info.

Just to be clear, if the number of entries are too large, the diffing may still take enough time that it can cause a stutter if being computed on the main thread.

from differencekit.

ra1028 avatar ra1028 commented on June 7, 2024

@shuoli84
Did you solve the problem?
Feel free to reopen this issue, if you didn't solved.

from differencekit.

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.