Optimization: only connect the current model to the account
ClosedPublic

Authored by dfaure on Feb 7 2020, 9:47 PM.

Details

Summary

Otherwise for each image being downloaded, the code was searching in
al messages of all models. Pretty wasteful.

Test Plan

Remove ~/.cache/ruqola, go to room with inline image.
Debug output in MessageModel went from 50 calls to just 1.
Only tested in widgets version, since the qml version crashes yet again.

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22198
Build 22216: arc lint + arc unit
dfaure requested review of this revision.Feb 7 2020, 9:47 PM
dfaure created this revision.
mlaurent accepted this revision.Feb 8 2020, 7:57 AM

Seem logic

This revision is now accepted and ready to land.Feb 8 2020, 7:57 AM
This revision was automatically updated to reflect the committed changes.