@gaojunxiao it looks like your for loop is incromenting through every object of the scene before and as it finds any instance of mesh so the for loop is slowing the process down as its running over unnessisary items in the scene, if your scene has a lot of objects this will undoubtedly take a lot more time to do one by one for each “I” the code I have suggested in previous reply disposes memory next to instantaneously and is pretty easy to implement if you want to try that?