Api consume long time in my new server

I am using All displayIds by calling NvAPI_GPU_GetAllDisplayIds, and it works well in my old server. Last month, I have changed a new one with 5 NVIDIA RTX 4000 Ada,and this api cost a long time, like 5 seconds for each GPU. Why does this happen?