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

Repository
R865 Ruqola
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
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.