Skip to content

Improving performance #89

@dagwieers

Description

@dagwieers

So now that we have unit tests, the logging output shows a few things we are doing on every run:

Debug: [script.module.inputstreamhelper-0.3.5]: Platform information: ('Linux', 'moria.gent.internal', '5.2.6-1.el7.elrepo.x86_64', '#1 SMP Sun Aug 4 10:13:32 EDT 2019', 'x86_64', '')
Debug: [script.module.inputstreamhelper-0.3.5]: inputstreamhelper is enabled. You can disable inputstreamhelper by setting "disabled" to "true" in settings.xml         (Note: only recommended for developers knowing what they're doing!)
Debug: [script.module.inputstreamhelper-0.3.5]: jsonrpc payload: {u'params': {u'addonid': u'inputstream.adaptive'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'Addons.GetAddonDetails'}
Debug: [script.module.inputstreamhelper-0.3.5]: jsonrpc response: {"id":1,"jsonrpc":"2.0","result":{"addon":{"enabled": "true"}}}
Debug: [script.module.inputstreamhelper-0.3.5]: inputstream.adaptive is installed.
Debug: [script.module.inputstreamhelper-0.3.5]: jsonrpc payload: {u'params': {u'properties': [u'enabled'], u'addonid': u'inputstream.adaptive'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'Addons.GetAddonDetails'}
Debug: [script.module.inputstreamhelper-0.3.5]: jsonrpc response: {"id":1,"jsonrpc":"2.0","result":{"addon":{"enabled": "true"}}}
Debug: [script.module.inputstreamhelper-0.3.5]: inputstream.adaptive 0.3.5 is enabled.
Debug: [script.module.inputstreamhelper-0.3.5]: inputstream.adaptive 0.3.5 is installed and enabled.
Debug: [script.module.inputstreamhelper-0.3.5]: Found Widevine binary at /home/dag/home-made/script.module.inputstreamhelper/test/cdm/libwidevinecdm.so
Debug: [script.module.inputstreamhelper-0.3.5]: [u'ldd', u'/home/dag/home-made/script.module.inputstreamhelper/test/cdm/libwidevinecdm.so'] cmd executed successfully.
Debug: [script.module.inputstreamhelper-0.3.5]: [u'ldd', u'/home/dag/home-made/script.module.inputstreamhelper/test/cdm/libwidevinecdm.so'] cmd output: 
	linux-vdso.so.1 =>  (0x00007fff063bd000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f00a75f8000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f00a72f6000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f00a70f2000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f00a6eea000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f00a6bd4000)
	libnss3.so => /lib64/libnss3.so (0x00007f00a68a5000)
	libnssutil3.so => /lib64/libnssutil3.so (0x00007f00a6675000)
	libnspr4.so => /lib64/libnspr4.so (0x00007f00a6437000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f00a6221000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f00a5e53000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f00a7ed6000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f00a5bf1000)
	libplc4.so => /lib64/libplc4.so (0x00007f00a59ec000)
	libplds4.so => /lib64/libplds4.so (0x00007f00a57e8000)

Debug: [script.module.inputstreamhelper-0.3.5]: There are no missing Widevine libraries! :-)
Debug: [script.module.inputstreamhelper-0.3.5]: Widevine update check was made on 2019-08-21T21:55:03

We can see the following things:

  1. A uname -a is performed
  2. A message is logged wrt. disabling the plugin
  3. inputstream.adaptive is tested (or possibly installed) and activated
  4. Widevine library is detected and ldd is run
  5. All required libraries are being detected

And I wonder if all of this is really required on every video playback.

As I indicated before #69, if we could detect that Widevine failed we can do all these things only on failure, rather than every time before playing. But lacking this possibility ATM could we get rid of any of this anyhow?

If we tested Widevine CDM properly after installation, do we still need to test it before every playback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions