Replies: 17 comments 2 replies
-
I'll investigate this. Do you see slowdowns when added |
Beta Was this translation helpful? Give feedback.
-
I see the same slowdown when adding
|
Beta Was this translation helpful? Give feedback.
-
What happens if you comment out the code of this function? https://github.com/spatie/ray/blob/master/src/Client.php#L23-L43 |
Beta Was this translation helpful? Give feedback.
-
After commenting the code within
|
Beta Was this translation helpful? Give feedback.
-
When in
|
Beta Was this translation helpful? Give feedback.
-
What happens if you use
|
Beta Was this translation helpful? Give feedback.
-
When using
But when I start the ray app, it does not show measurements, which seems logical since there is not enough time to transmit the request. In my environment, with |
Beta Was this translation helpful? Give feedback.
-
@freekmurze I have been working on a PR that may resolve this (it's nearly finished) - it acts as a type of circuit breaker if an initial cURL call fails. Should I submit this or do you have a fix in the works? |
Beta Was this translation helpful? Give feedback.
-
Please submit it 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi @Polfo, Could you check again with ray versions 1.19.2? This one has the PR of @patinthehat merged that could possibly solve the problem. If that does not solve the problem we should try to tune the |
Beta Was this translation helpful? Give feedback.
-
It defnitly improved, but still 1.2 seconds delay due to
|
Beta Was this translation helpful? Give feedback.
-
@Polfo @rubenvanassche @freekmurze I can submit a supplemental PR for Any thoughts as to whether this will resolve the issue? |
Beta Was this translation helpful? Give feedback.
-
Using the Laravel cache seems a good idea to me. It might be to complex though. There still will be a 1.5 seconds delay every 30 seconds for Laravel users and on each request for other users. Can the timeout be shortened? Only during performAvailabilityCheck() probably to reduce risk. Wouldn't it be good to warn users when the timeout occurs? Configurable, default = warning on. |
Beta Was this translation helpful? Give feedback.
-
Warn users in what way? I think that @freekmurze & team have avoided user warnings and the like, so that'd be their call. |
Beta Was this translation helpful? Give feedback.
-
I'll convert this to a discussion, as there is a fix in placate by @patinthehat, but we could still discuss the details on further improvements. |
Beta Was this translation helpful? Give feedback.
-
https://spatie.be/docs/ray/v1/the-ray-desktop-app/discovering-the-ray-app states
That is a very nice feature, but we have reasons to worry when not Laravel. The current implementation can cause hundreds of milliseconds (up to 2 seconds) curl timeout delay on a page load (every page by default when the ray app is missing) and that is not acceptable.
Additionally, implement #151 (comment) |
Beta Was this translation helpful? Give feedback.
-
This one slipped into our production environment, which had us scratching our heads for a second. Suddenly had a lot of requests taking 2 seconds, much to the amusement of our customers. (-: We've currently just removed all ray calls in our application and made sure the package is only installed in development environments. Would have preferred keeping the ray calls in our codebase for ease of use though. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
After booting Windows 10, but not starting the Ray app, calls to ray() cause seconds delay in execution.
Versions
spatie/ray (1.19.1)
PHP 7.4.9
To Reproduce
Output;
Expected behavior
Performance is independent of Ray App running.
It took me hours to figure out why my app was running slowly.
The promise of ray is that it runs on all machines whithout having to remove ray() statements.
Desktop:
Additional context
This does not happen when the ray app is running. In that case, the results on the same machine are:
Beta Was this translation helpful? Give feedback.
All reactions