Don't edit a 10,000-line text file by hand. Use dedicated editors to prune or reorganize your list before you deploy it: IPTV Editor / MyIPTV List:
Managing 10,000 tracks requires a "Parent-Child" playlist structure to remain functional: 10000 m3u playlist portable