On 1 Apr 2016, at 09:33, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
My script is only 470 lines long, but it uses DBI module (and some minor others). Maybe it's quite complex and causing the slowdown. The DBI module is huge.
If your Perl script is 470 lines, you can probably do all of that work in unlang. Actually, i'm trying to migrate from unlang to Perl. Because of unlang's poor syntax (such as returning only one value from {%sql .. })
map sql "SELECT ALL, THE, COLUMNS FROM STFU WHERE 1" { Reply-Message += 'ALL', Reply-Message += 'THE', Reply-Message += 'COLUMNS' }
-Arran
I have almost a complete rlm_lua implementation, there just doesn't seem to be a demand for it. Lua/LuaJIT was designed to be embedded, they are insanely fast (especially so with LuaJIT), lock free, and fits well with our current and future processing models. The marshalling/unmarshalling code in rlm_perl and rlm_python is complete garbage, the stuff I wrote for rlm_lua does everything on the fly as attributes are read from and written to. I expect marshalling rlm_python could be improved, but I hold out little hope for the steaming pile of filth that is Perl. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2