recent_topics: Show message list underpadding before container.
recent_topics: Show message list underpadding before container.

Going through the description of commit
a150b9b0aed2f95c607f13accc2b08b08fb5f29d is highly recommended since
this is a related issue.

We had received a complaint on chat.zulip.org about navigation with
the keyboard `n` key being significantly slow (~5 seconds), the first
time `n` was pressed when starting from the recent topics view.

It was difficult to reproduce the amount of lag that was reported, but
running chrome with the profile tab set to 4x slowdown helped get
close to it.

Based on profiling from the original report, as well as locally with
chrome set to 4x slowdown, led to the realisation that recent topics
to stream navigation involved a lot of dom thrashing, and so this
series of commits aims to prevent this path from causing forced
reflows.

In this commit, we reorder the calls to $(...).show() in
recent_topics_ui.hide(), this prevents the first reflow in this path,
most likely because displaying message_feed_container before
message_view_header_underpadding was guaranteed to cause style
recalculations since the underpadding is visually above the message
container.

This causes a net 60 ms decrease in the first renarrow, an ~ 70 ms
increase in the second renarrow and an ~ 5 ms increase in the third
renarrow but, more importantly, it eliminates one reflow and sets on a
path where we can achieve strong gains in subsequent commits.

rht/zulip,zulip/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,andersk/zulip,kou/zulip,eeshangarg/zulip,kou/zulip,andersk/zulip,andersk/zulip,rht/zulip,andersk/zulip,kou/zulip,eeshangarg/zulip,kou/zulip,zulip/zulip,zulip/zulip,rht/zulip,zulip/zulip,eeshangarg/zulip,rht/zulip,kou/zulip,andersk/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,eeshangarg/zulip,rht/zulip,rht/zulip,zulip/zulip,eeshangarg/zulip,kou/zulip,kou/zulip,rht/zulip