I can able to retrieve the hyperlinks from the Slides.Now I need to replace the old link with new link.
I have observed the code sample shared by you and it seems perfectly fine. The performance of the above code depends on amount of text in your presentation. You are actually traversing through every slide shape and for every shape with text, you are extracting the text on portion level by continuous looping. The performance here depends on content inside presentation. I have seen your other post where you have shared the code in which you are extracting the hyperlink list on slide level. This would save your continuous looping inside every shape paragraphs and portions in order to locate hyperlink and doing the replacement. Therefore, using the code in your other post, you can do the replacement certainly with much better performance.