in reply to speed issues

You should consider using your systems sort utility (keyed on the time) on your log files at the end of each business day.

You could then revise your code to go through each file's @workingdata once, rather than the current 24 times.