On my page, I use 2 async ajax calls and sessions (with default config).
The problem is, that one of the calls is quite slow (>1s), but only if you run both requests at the same time. I think its because of session (b)locking.
Because i dont write to the session, just reading in this requests, I tried now to to the following in the app bootstrap:
Fuel's own session drivers are non blocking (but may have concurrency issues when updating the session), PHP's own session handling is blocking (for exactly that reason).
session_write_close() is a PHP statement, which Fuel doesn't use.
You mention you use "the default settings". The default is using a cookie, it has no backend storage at all that could cause any locking. All other drivers are non-blocking, apart from their I/O itself (i.e. the file driver locks the file, read or writes, unlocks the file, the database takes care of atomic operations itself, etc).
When you use concurrent "async" requests, writing to the session is a bad idea because of this, as you don't know which requests will be overwriting what.
Perhaps you can enable the profiler, and set "log_profile_data" to true in your config (you need to be up to date for this), to have the profile data of the requests logged, so you may see where the delay is?
With default settings, I mean I have not created my own session.php config file, so yes, cookies are used.
I have tried to activate this log_profile_data flag and now its logging (creating log files like 06-profiler-20170206142058.php), but only the "main"-request (not ajax request) is logged correctly. For the 2 ajax requests, there is only ONE log file created, but its empty (only with "" in it)??
Maybe its because they are generated by a \Controller_Rest controller?
And as I said, the requests itself are not slow (if I call them directly, not async with the other ajax request). I tried both of them separate.