Handle the most common case of one session and one decoder first so
we can exit early. This has a small, but measurable performance benefit.
struct srd_session *sess;
GSList *l;
+ /* Performance shortcut: Handle the most common case first. */
+ sess = sessions->data;
+ di = sess->di_list->data;
+ if (di->py_inst == obj)
+ return di;
+
di = NULL;
for (l = sessions; di == NULL && l != NULL; l = l->next) {
sess = l->data;