Since loading the XML file itself is taking a long time, it would be best to increase the timeout of your function. Also, instead of processing the large file, you could split it into multiple separate files for parallel processing it across multiple function invocations.
Also, Durable Functions would be an excellent choice to split your complete workflow in multiple steps.