Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving performance #89

Open
dagwieers opened this issue Aug 21, 2019 · 3 comments
Open

Improving performance #89

dagwieers opened this issue Aug 21, 2019 · 3 comments
Labels
Milestone

Comments

@dagwieers
Copy link
Collaborator

dagwieers commented Aug 21, 2019

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?

@dagwieers
Copy link
Collaborator Author

What we could do have these tests also as part of a Troubleshooting section in the settings.
This way if people do have playback issues with Widevine, they can run those.
Or they could reinstall Widevine to have it retested, obviously.

@dagwieers dagwieers added this to the 0.5.0 milestone Aug 21, 2019
@horstle
Copy link
Collaborator

horstle commented Aug 23, 2019

idk how long it takes to run _supports_widevine() but most of it (except maybe the Kodi version) won't ever change, so I guess that could be improved.

@dagwieers
Copy link
Collaborator Author

When check_inputstream() is run and there is no update required, we look for the best image twice.

Debug: [script.module.inputstreamhelper-1.2.3]: Find best ARM image to use from recovery.conf
Debug: [script.module.inputstreamhelper-1.2.3]: SKATE (2128801384) is smaller than BOB (3373181067)
Debug: [script.module.inputstreamhelper-1.2.3]: ELM (12239.67.0) is newer than SKATE (12105.100.0)
Debug: [script.module.inputstreamhelper-1.2.3]: HANA (3373917985) is smaller than ELM (3374763553)
Debug: [script.module.inputstreamhelper-1.2.3]: BIG (2139898279) is smaller than HANA (3373917985)
Debug: [script.module.inputstreamhelper-1.2.3]: Find best ARM image to use from recovery.conf
Debug: [script.module.inputstreamhelper-1.2.3]: SKATE (2128801384) is smaller than BOB (3373181067)
Debug: [script.module.inputstreamhelper-1.2.3]: ELM (12239.67.0) is newer than SKATE (12105.100.0)
Debug: [script.module.inputstreamhelper-1.2.3]: HANA (3373917985) is smaller than ELM (3374763553)
Debug: [script.module.inputstreamhelper-1.2.3]: BIG (2139898279) is smaller than HANA (3373917985)
Debug: [script.module.inputstreamhelper-1.2.3]: Latest Chrome OS version is 12239.67.0
Debug: [script.module.inputstreamhelper-1.2.3]: Current Chrome OS version installed is 12239.67.0
Debug: [script.module.inputstreamhelper-1.2.3]: User is on the latest available Chrome OS version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants