GradleBuild.synchronize slow issue

When there is multipul sub projects in workspace (more than 500 sub projects) and executing GradleBuild.synchronize method, the process will run forever. it seems the process will take a day to finesh, so I am wondering is there a better and efficient way to synchronize the workspace when there are multiple sub projects. thanks in advance.