Code review comment for lp:~michael-sheldon/webbrowser-app/file-upload

Revision history for this message
Olivier Tilloy (osomon) wrote :

> The Loader is separate because the ContentPickerDialog and gets destroyed when
> the dialog is closed, keeping it separate allows us to avoid having to requery
> the content-hub for peers every time the dialog is displayed (which is less of
> an issue now the dbus speed problems are resolved, but could become important
> again when there are a lot of peers).
>
> (The ContentPeerPicker component will create a model itself when a custom
> model isn't provided, so most apps don't need to worry about this sort of
> thing).

That makes sense, thanks for explaining. Would you mind adding a comment in the Loader instance to explain that? It’s not immediately obvious from a quick peak at the code, I wouldn’t want this optimization to disappear in a future refactoring.

« Back to merge proposal