If your requests take 3-5 sec to finish, then there is most likely something else going on. The admin Ajax itself won’t take that much to load. You might be having some heavy plugin, or having some hooks running expensive meta queries on load.
You can try the REST-API, which is slightly faster than Admin-Ajax. But the response will be in JSON, instead of plain HTML, you have to note that one.
Also, there might be an issue with the TTFB. Try disabling all the plugins, revert to default theme (move your code to default theme) and check if the problem still persists.
Related Posts:
- Using Backbone with the WordPress AJAX API
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Including WordPress in RESTful API
- REST API endpoint for elasticpress autosuggest
- Gutenberg – how to correctly perform ajax request on backend
- How is it possible that the function of the test page works, but it does not go live?
- AJAX request from Chrome Extension to WordPress Website
- WP REST API route request explain
- Confused on AJAX submit form through page template
- Solve cors problem using rest api or ajax
- Is there a hook to process a backbone restful PUT request inside wordpress?
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- How to add WP API and JS featured image attachment
- how to send Ajax request in wordpress backend
- Identical wp_rest nonce returned from rest_api
- How do I get reusable blocks via frontend REST API?
- Is there builtin way to use protected AJAX endpoint?
- rest_no_route custom route
- Test WordPress api with postman
- How to load content from many posts on a page, only if needed
- How do I query posts by a sub value with the API?
- merge wp rest api query to get posts per category does not work
- How to make a fetch() POST request to wordpress rest api?
- post values to custom post type which has advanced custom fields
- REST public POST giving 403 forbidden nginx
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- 404 error custom post type rest api
- How to require files in a custom endpoint
- Create a post with REST API and adding a category
- Should I edit a user meta field with PUT, PATCH, or POST and WP::Editable
- How to trigger lost password email using REST API?
- how reduce fetch/XHR response time
- Custom WP rest api endpoint only working on non https?
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- How to submit a button automatically after every scheduled hours?
- jQuery: Performing synchronous AJAX requests
- Best way to end WordPress ajax request and why?
- How to pass data parameter to ajax action function handler
- Contact Form 7 Custom Post Action
- Update user meta using with ajax
- WordPress function that makes HTML safe to be sent via AJAX request
- admin-ajax.php returns 0. How do I debug it and fix it?
- Detecting post type within init action
- Basic question on passing variables to AJAX in WordPress
- Metabox cloning via Admin Ajax call issue
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- help on wp_editor via ajax load [duplicate]
- Cannot update my options using wp_ajax
- WP REST return value to error function from Request
- ajax and nonce when JavaScript is in a seperate file
- Prevent wp_debug from polluting ajax within plugin
- How to localize inline script called with ajax
- Conditional Ajax inclusion
- Buddypress ajax problem after adding new groups sub nav [closed]
- Allow AJAX call to other roles than admin
- How to check username availability with ajax at registration
- submitting form via admin-ajax.php returns 0
- Can a wp_nonce created from domain 1 to be verified on domain 2?
- admin-ajax.php slow, how to speed it up?
- How to use several wp_ajax_ functions for different queries?
- Three level taxonomy dropdown frontend
- Unable to parse JSON response from wp_send_json_success [closed]
- Add ajax load more function using WP API
- How to solve “Updating failed” with 403 Error when trying to save a Site or Post in Gutenberg?
- How to set post_id to 0 when you upload image via Add media button. (async-upload.php)
- How would you update a frontend form with AJAX
- Updating User Meta with Array on Click of Button AJAX
- Why is on status span no search results?
- eventON plugin AJAX call triggers website crash
- wp_enqueue_script() doesn’t work with AJAX
- Dynamically add more fields/remove last field in a form
- Ajax Request for both logged and non logged users
- Force redirect single.php to index
- Any plugin or Script to integrate ajax selection module into WordPress page
- bulk update meta value with ajax
- Is it possible to create new user from external form using REST API?
- Is it possible to determine whether a page is a page template by page_id in ajax call?
- Chained ajax call, second call returns 0
- How to stop being directed to admin.php after sending request to admin-ajax.php
- How to make pages that arent indexed for ajax applications
- Why does reCAPTCHA v3 return 0 ? In custom AJAX registration form
- admin-ajax.php 400 bad request
- How to do admin ajax request in a plugin for rest api
- WordPress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start
- Set cors header for ajax requests
- Simple AJAX code that refreshes every x seconds?
- Search function – problem with whole words
- I am getting Admin-ajax.php 400 Error
- Ajax and get_template_part
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- WordPress 4.9.6 – IncludeMe & getAjax GET using wrong URL
- check_admin_referer fails on new AJAX plugin uninstall with “Are you sure you want to do this?”
- Weird admin-ajax.php problem
- Trying to send AJAX data to WordPress hook
- wp_enqueue_media problem
- Update user meta using Ajax on front end?
- retrieving page content per AJAX [duplicate]
- Can’t access data from database using AJAX
- Running js in html code with same content
- how can i create get request unis ajax without expecting return value