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

Remove request in Angular index.html to material icons - this could be causing the slowdown #102

Closed
InBrewJ opened this issue Jul 24, 2019 · 9 comments
Assignees

Comments

@InBrewJ
Copy link
Contributor

InBrewJ commented Jul 24, 2019

No description provided.

@InBrewJ
Copy link
Contributor Author

InBrewJ commented Aug 3, 2019

@pisuke This is exactly what's causing the slowdown. Well spotted!

Super simple fix. I'll look into the rest of the issues tomorrow - I had a slow start today because of some ssh issues

@pisuke
Copy link
Contributor

pisuke commented Aug 3, 2019

@InBrewJ no worries, thanks for checking! And glad you think this is the cause of the slowdown.
@bungeejim was of the opinion the SRT size is also an issue, so I'll have a look at it too, unless you're 100% the SRT size is a red herring ...

@InBrewJ
Copy link
Contributor Author

InBrewJ commented Aug 4, 2019

@pisuke The SRT size is definitely affecting performance but it's no longer compounded by the timeout caused by this error. I'm still digging though :)

@pisuke
Copy link
Contributor

pisuke commented Aug 4, 2019

@InBrewJ I've dug deeper today, and the 60 MB file load up in about 18 seconds.
I've managed to reduce the SRT loading time to 12 seconds with file optimisation.
This amount of time seems manageable, but to improve this we'll have to either consider switching to a binary format or use the streaming functionality in pysrt.

@InBrewJ
Copy link
Contributor Author

InBrewJ commented Aug 4, 2019

Full disclosure, I hadn't actually started digging yet. Seems like great steps though 💪

This sort of streaming stuff?

https://kite.com/python/docs/pysrt.stream
https://github.com/byroot/pysrt/blob/master/pysrt/srtfile.py#L181

@InBrewJ InBrewJ closed this as completed Aug 4, 2019
InBrewJ added a commit that referenced this issue Aug 4, 2019
@pisuke
Copy link
Contributor

pisuke commented Aug 4, 2019

Yup, I had a quick discussion with Jean and he suggested to have a look at the streaming function, and perhaps do some profiling too.
I did try a direct replacement of open with stream but it didn't work as it is based on a python generator. It really needs incremental reading, so I'm thinking of trying next to add a thread that goes through the stream items as suggested in the documentation. Something to try later in the week, unless you want to give it a go earlier.

@InBrewJ
Copy link
Contributor Author

InBrewJ commented Aug 4, 2019

I probably won't have time in the week after hopefully getting through the jack/hdmi switch and the filetype whitelisting etc, it could be best if you stick with this for now.

Also, @bungeejim I've updated the standalone player software on Docker Hub - your lrpi should pick it up after a reboot (after plugging in an internet connected ethernet cable). Let me know if there are any problems

@pisuke
Copy link
Contributor

pisuke commented Aug 4, 2019

@InBrewJ Cool, happy to do it my side, sure.
Are you changes just in develop or are you going to merge to master too?
Shall we do it with PRs and code reviews? I've sent you a couple earlier today, but ended up merging changes to display and bootstrap anyway (develop was actually behind master in both cases).

@InBrewJ
Copy link
Contributor Author

InBrewJ commented Aug 5, 2019

@pisuke There seems to be a divergence between a few of the repos and DockerHub - I'll do an audit of everything tonight.

From what I can tell, the docker-compose.yaml in Jim's standalone box (see https://drive.google.com/drive/u/1/folders/1jwaxGesE7uv896qadnCNJdYJfT2RIIcW) targets lushdigital/lushroom-player:staging rather than lushdigital/lushroom-player:latest - hence why I haven't merged into master yet.

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

No branches or pull requests

2 participants