-
Notifications
You must be signed in to change notification settings - Fork 30
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
Processing times #70
Comments
Hi there, thanks for your issue report. The first thing to say is that you've uncovered an edge case bug in the script runtime calculation. In the above example the script runtime was 1 hr 9 minutes 42 seconds but the script doesn't currently include the hour part because I never envisaged script runtime ever being this huge :) The second thing to say is that there is something very wrong with script performance at the moment with the volume of data that you're processing through. There's a possibility that I'll be able to tweak code to achieve improved performance but to do that I would need test data which is representative of what you're using to enable me to debug / test. If you're willing to strip out any/all sensitive values from your m3u and epg files (passwords, hostnames etc) and attach the files here, I'll take a look asap. |
Hi @bebo-dot-dev, thank you so much for your prompt response. I have sent you an email with both the m3u and epg files. Let me know if you have received this. Cheers, |
Hi again, email and data received thanks. I'll test asap and update back here when I have something concrete for you :) |
Following initial testing, early feedback is that the two second delay per EPG progamme is caused by the time that it takes to find all programme elements in the EPG xml data that match a given channel on the following line which is called iteratively for every wanted channel in the M3U: https://github.com/bebo-dot-dev/m3u-epg-editor/blob/master/m3u-epg-editor-py3.py#L934 To put this in perspective, the supplied EPG I'm testing with is 465MB and it contains 1,232,817 programme elements and although the entire xml tree is in memory, I'm going to play with a few different strategies to see if I can improve performance in this area but I imagine that it will be some time before I have a fix (..if I manage to find a fix). Just wanted to let you know what I've found so far, I'll stick with it. |
Hi again, there's a candidate fix for this issue in the https://github.com/bebo-dot-dev/m3u-epg-editor/tree/epg-performance branch now. EPG channel lookup performance is improved, I retested with the 465MB sample EPG file and it's now being processed in about 1 minute 11 seconds here .. is a slight improvement over the previous 1hr+ :) Please give it a try and let me know how you go thanks. |
Hi @bebo-dot-dev, you are amazing! Just ran the script and it completed for me in 2 minutes and 31 seconds with my actual dataset. Thank you so much for your help on this! |
Hi again, no problem, sounds like a winner :) Merging the change now. |
All merged, feel free to use https://github.com/bebo-dot-dev/m3u-epg-editor/tree/master going forward again thanks |
Hi @bebo-dot-dev, thank you for your amazing work on this project so far.
I have been looking at ways to slim down an EPG file (425mb) that I currently have access to. It includes EPGs for approximately 6000 channels. I have m3u4u to manage/clean my m3u file and I am looking at an efficient way of trimming down the data in my epg file (m3u4u does not do that). My new playlist has appx 2500 channels now and it takes me a little over an hour to produce the corresponding EPG file using this script. I am using the following config for doing so:
With that said, is the approximate 1 hr and 10 mins of processing time expected here? I am running this on a decent NAS (Synology DS918+, with upgraded RAM to 32GB). My CPU only peaks at 25% percent when the script is running. Also a note that this is being executed in a Docker (Ubuntu image w. python 3.10.4). The current 'programme element' creation is currently taking appx 2 seconds per channel. The initial channel creation itself on the other hand is very quick and done in a few seconds.
I have tried narrowing down the
--range
to 12 hours, without any luck. It took the same time to process the list.Interesting enough, the logs shows me a
script runtime: 9 minutes 42 seconds
which is not true, see actual log timestamps.Would you have any thoughts on how I can speed this up?
Update: just attempted to run this on the host of my NAS and I am seeing very similar runtimes, apx 2 seconds per programme
The text was updated successfully, but these errors were encountered: