[mythtv] Android Release builds

David Engel david at istwok.net
Thu Sep 20 14:41:32 UTC 2018


On Thu, Sep 20, 2018 at 02:32:10PM +1000, Mark Spieth wrote:
> 
> On 20/09/18 14:07, David Engel wrote:
> > On Wed, Sep 19, 2018 at 02:46:07PM -0500, David Engel wrote:
> > > On Wed, Sep 19, 2018 at 02:55:06PM -0400, Peter Bennett wrote:
> > > > On 09/19/2018 11:05 AM, David Engel wrote:
> > > > > Not coincidentally, I'd started building my own Android package with
> > > > > --compile-type=profile on Sunday.  I later noticed that skips were
> > > > > considerably longer on my Shield.  The video took around .5 to .8
> > > > > seconds to resume instead of about .1 seconds like before.  In
> > > > > addition, the audio started right away while the video was still
> > > > > frozen.  It made for a jarring and unpleasant effect.
> > > > > 
> > > > > I hand't built an Android package in over a week so my first suspicion
> > > > > was the new, vaapi2 changes were to blame.  After, several test
> > > > > builds, I finally confirmed last that it wasn't the vaapi2 changes.
> > > > > Rather, it was using compile type profile.  For as yet unknown
> > > > > reasons, compile type profile produces worse code than compile type
> > > > > debug on Android, at least when measuered by skip performance.
> > > > I built using the release mythbuild.sh option, which now does compile type
> > > > "profile". I find skips to still be instantaneous. Are you using a recording
> > > > or a video? Does the recording have a seek table? Maybe the seek table
> > > > actually slows it down? Personally I am suspicious of the seek table and
> > > > would like to get rid of it.
> > > The seek tables are fine and I always used the same recordings when
> > > doing before and after comparisons.
> > This is partially but still not totally solved.
> > 
> > When I built with profile before, I simply changed
> > CONFIGUREBUILDTYPE="debug --enable-small" to
> > CONFIGUREBUILDTYPE="profile --enable-small".  With "profile
> > --enable-small", skips were noticeably slower as I reported.
> > 
> > Tonight, I built with simply "profile".  With "profile", skips at 1x
> > speed were comparable to "debug --enable-small" (good).  At higher
> > 1.8x, however, skips were noticeably slower again (bad).
> > 
> > In short, dropping "--enable-small" helped but there is still an
> > issue.  I'm going to try some other option combinations.
> > 
> The seek table for any recording (injected or not) uses the seek table in
> the db for that recording which gets written during record or the first time
> its played back. This is important for TS files since there is no embedded
> seek info/metadata in it. If MFE has trouble getting the seek info (which it
> has to do on skip) then that will delay completion of the skip. If there is
> no seek table, ts seeking is a "guess" algo and then play until the
> requested pts is found, after which it starts "playing". Any errors in the
> TS will also delay sync after a blind file seek.
> 
> This is why wifi does not work as well as wired network (AFAIK).
> 
> Video as opposed to Watch Recordings uses ffmpeg to do the seeking which
> uses any file metadata to look up the desired pts in the file. TS does
> hunting as described above since there is no metadata for this purpose (its
> a stream).

As already noted, the recording all had seek tables.  That is not an
issue here.

> That said, there should be no difference in skip performance between any of
> the build types. You would expect release to be better %CPU than profile
> than debug depending on opt levels. This is arm so the cache sizes are
> smaller.

There can be differeneces but I expect them to be small to negligible.
The differences I see are very noticeable.

> Smaller tighter binaries may benefit from cache localization. May explain
> what you are seeing.

Smaller code isn't always faster.  If it was, there wouldn't be a need
for the option.

> Other than that, IDK and YMMV.

Yes.  Given this new information, I don't think we should build with
profile on Android.  I need to test with and without it on a couple of
Linux platforms.  I don't expect it to make much difference on my
relatively beefy desktop with vdpau but it might on my lowly Chromebox
with and without vaapi2.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list