Thanks for your response!
We are unable to provide you with the exact data as we will need approval from higher authority due to confidentiality for sharing the data.
I tried sharing dummy data creating an exe. file, but in exe. file we are not getting the performance issue as we are getting in the real time scenario. (You replied saying you were able to download the file in 6 seconds for 1000 items.).
Before this mail I asked you to please check for the resource issue. (It is working as expected now.)
For that I did a logic change I added the resource in the resource sheet first and then just set the resource name in the loop. by doing this we are able to download 1000 items in 20 seconds as reverted by you.
My Export Logic as of now is working and is taking 4 minutes to download 4000 items.
(Would have been better if we were able to download it more faster.)
Currently I am working on the Import logic.
I am exporting the data(It contains some hidden fields i.e. workstreamId and Task Id)
and we are using an Action Flag Column (which has option Update Delete and Insert).
If we are doing any action in the MPP; we will have to mark the Action Flag Accordingly.