Comments (11)
Great case, thanks. I did not try to use the library with large sets, usually I'm dealing with hundred items at most and do not see this problem there.
Give me a couple of days, I'll try to think of something.
from awesometableanimationcalculator.
@mikeger I've questions regarding your case. How complex is your cell model equality check? How many cells and how many sections are there?
from awesometableanimationcalculator.
I am working on chat / communication app similar to Telegram / Skype. It's up to user, max I've seen was 1000 conversations.
The order of conversations is predefined by last message date. Conversations on our side can not be copied as they are NSManagedObject
s, so on each reload I also have to "wrap" every conversation into containing object that is inherited from ACellModel
.
Equality is checked by NSUUID
conversation ID.
from awesometableanimationcalculator.
And how often do you invoke the calculator?
I'm profiling 100 000 (rather simple) cells right now and they are calculating about 30 seconds on iPod Touch 5th gen. That is very long (and I want to speed it up), but 1000 cells must sort in a fraction of a second.
from awesometableanimationcalculator.
Observed delay was around 300-600 ms on iPhone 5s, but it happens on every received message because every update could potentially bring some old chat up
from awesometableanimationcalculator.
I see.
Thanks for the information. Let's see what can be done here... :-)
from awesometableanimationcalculator.
One more question. Did you use updateItems to specify items you've added/updated/removed or setItems that updates whole list?
from awesometableanimationcalculator.
I've used setItems()
because I don't know the updated items, if I would know the updated items then I would not need to use the library to calculate the difference :)
from awesometableanimationcalculator.
Usually you do know objects that were changed/added/removed, but you do not know where they must be placed in a list and do not know the table transformations you need to perform to get there.
When you use setItems
, everything has to be checked. Of course it takes time :)
But anyway, I understand the exact problem now and will try to optimise it.
from awesometableanimationcalculator.
Hi! Look at this good implementation of Paul Heckel diffing algorithm by Instagram. I thinks it's related.
from awesometableanimationcalculator.
I need to look into it closely, but looks like there is not the common case. Does he takes into account possibility of several sections and cross-section items moving?
from awesometableanimationcalculator.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesometableanimationcalculator.