Hi Ximeng,
how many objects does the database return to you through this xpath?
Make sure you don't use any != operators on the Xpath and be sure that your call doesn't happen more than once.
You can find good performance tips here:
Community Best Practices for App Performance | Mendix Documentation
Building high performing apps with Mendix | CLEVR
Regarding your question:
I think that it is not possible to display a loading bar if you retrieve the data via xpath. (without workarounds)
With a microflow you can activate a loading bar in the microflow settings and with nanoflows you can install a start loading bar activity at the beginning of your flow - then call the microflow - then an end loading bar
The Nanoflow :
Hope this Helps,