-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not informative exception #258
Comments
Actually, this bug has already been fixed in the upcoming v0.17, but I agree the exception is odd and should be fixed in v0.16. |
However, the error after the bug fix will only be Tracking error location has a cost, for runtime performance — i mean it would also impact normal unchecked serialization — but also in code complexity, cost that I don't want to pay for an assertion. Of course, my opinion can change, but for now with static type checking, I don't really see the interest. Actually, the serialization type checking feature was not even planed at first ; I've added it because others do, and because it was easy to add ( |
Let me highlight the use case. That code that I put earlier in the issue is just a super short example of trace and nothing more. So we have really broken data and from this point how quickly we can mitigate depends only on informativity about the issue nature. Such an amount of exception information can be enough only for that person who writes the code. If the issue escalated on SRE, support, etc. it's not. |
There are two different speeds here:
|
BTW, I'm pretty sure that no reason for collecting all errors here. Trace and path to the first invalid item are totally enough. |
In fact, I did not take in account complex things like SQLAlchemy in my statement about static type checking. It's indeed an argument to consider about adding error location tracing. However, I think indeed that collecting all errors will never be done, as there would be surely too much impact on unchecked code. I propose you to keep this issue for the bug fix only, and to create another one about the error location tracing. I think it will have to wait v0.17, because the code has been completely changed since with cythonization. |
Hi @wyfo ,
First of all, the project is impressive! We get a boost of 25% compared to well-tuned Pydantic serialization, which was like the following one when all non-BaseModel nested attributes were on the shoulders of orjson's SIMD.:
I get these results on not-Cythonized version. So the main benchmark will occur shortly after integration, and I strongly believe that I'll get superior results.
But lets' get closer to the issue topic
I'm getting the following exception.
The fact that exception has arrived is proper behavior that I expect. But, the exception doesn't provide any useful information.
It will be great to see something similar to exceptions we can get from the deserialization phase.
The text was updated successfully, but these errors were encountered: