Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

admin-ajax seems incredible slow compared with an own and custom service entry point (site.com/wordpress/wp-content/myplugin/rpc.php?....).

In our custom service entry, we actually load only : wp-config.php & wp-load.php and then our RPC handler = 120ms for a RPC request.

When going over admin-ajax.php its 950ms for the same request. Is there anything we can do to speed it up ? IE, can we disable filters, plugins which have nothing to do with our request?

We'd like to switch to admin-ajax but with this performance its simply aweful for user experience.

well, any idea is welcome.

thank you!

share|improve this question

1 Answer 1

Ajax endpoint is known to be relatively slow, but that primarily comes from loading WordPress core.

If you are seeing drastic difference between two endpoints (native Ajax vs yours custom) that both perform core load, then something is doing something that degrades Ajax endpoint on top of it.

I would profile Ajax endpoint to have better idea of what is actually taking that much time. Without that it's impossible to make good guess for situation described.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.