You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Udo, first of all thanks for the awesome library!
I'm using the EvalEx library for the Liferay portal project but we've found something that impacts the performance of some operations.
For example expression such as SQRT(9123744984893^993837) takes a lot of time to evaluate and the eval() method hangs for a while.
We can solve this at our side, but I was wondering if that's something you would like to include in your library. Something like a timed out condition for evaluations. I can send you a pull request if you think so.
It's been a while, but today I was playing around with some possibilities for a timeout. It seems that the problems are in the BigDecimal class, which can be very slow on very large numbers. Do you have a working solution and how does it work? The only solution that I came up with, was using separate threads, but this is not nice and the Expression class is IMHO not the right place to handle this.
hey @uklimaschewski, sorry for the delay. Yeah, it's not so simple unfortunately. My workaround was to limit the numeric range of some operations to double.
It was something we could afford on our side but it's definitely not the solution for EvalEx.
Hey Udo, first of all thanks for the awesome library!
I'm using the EvalEx library for the Liferay portal project but we've found something that impacts the performance of some operations.
For example expression such as
SQRT(9123744984893^993837)
takes a lot of time to evaluate and the eval() method hangs for a while.We can solve this at our side, but I was wondering if that's something you would like to include in your library. Something like a
timed out
condition for evaluations. I can send you a pull request if you think so.Let me know what you think.
Best Regards @uklimaschewski,
The text was updated successfully, but these errors were encountered: