Open dbrgn opened 7 years ago
Will this also speed up loading of conversations? If not, we should probably create a new issue. :)
Even though the performance has increased by a lot since the first versions of threema web I still experience a very notable lag when switching conversations - even on very fast computers. (Today I used Threema Web on the computers of my university, which gave this a completely different experience) On my own notebook (which is not as powerful) opening the emoji-picker also gives a notable delay.
I recorded the conversation changing on my notebook just now and it took 3.9s. Very much time is spent in angular's $digest-functions and from my own experiences with ng-repeat I'm remembering that it kinda does this a lot? (Not sure, though) (Profiled with Chrome 71 on Windows 10)
I'd really love to see some further improvements in this area.
Using track by message.id
may also help, see https://docs.angularjs.org/api/ng/directive/ngRepeat#tracking-and-duplicates
But this should be testet as a negative sideeffect may (?) be, that the status cannot be updated.
The
ng-repeat
directive might be the source of a lot of performance problems.Replacing it with a custom directive would probably improve a lot.
The directive would then have methods to update the status of existing messages via message id.
Refs #20 and #39.