threema-web icon indicating copy to clipboard operation
threema-web copied to clipboard

Replace ng-repeat in conversation with custom directive

Open dbrgn opened this issue 7 years ago • 3 comments

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.

dbrgn avatar Feb 16 '17 08:02 dbrgn

Will this also speed up loading of conversations? If not, we should probably create a new issue. :)

ovalseven8 avatar Oct 23 '17 15:10 ovalseven8

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) threema-web-changing-conversation (Profiled with Chrome 71 on Windows 10)

I'd really love to see some further improvements in this area.

Elsensee avatar Jan 07 '19 22:01 Elsensee

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.

IndianaDschones avatar May 25 '20 20:05 IndianaDschones