https://bugzilla.wikimedia.org/show_bug.cgi?id=45684
--- Comment #2 from Tim Starling <[email protected]> --- It's not especially simple to remove the time spent in getExpandedArgument() from the Lua usage timer, because stopping and restarting the timer causes it to be truncated to a fairly coarse resolution. If you stopped the timer during getExpandedArgument() calls, then expanding an argument once every millisecond or so would allow Lua to run forever. It's the same reason why the profiling timer is not stopped during PHP execution. Maybe it would be possible to record the CPU usage delta by calling timer_gettime() at the start and end of the getExpandedArgument() call. But translating that discount into delayed signal delivery would need to be done with care, to avoid the same resolution issue when calling timer_settime(). Just increasing the CPU limit to 30 seconds or so would be easy and would mostly fix the problem, but that is not the request made in this bug report. (In reply to comment #1) > The other alternative would be to remove the separate Lua clock and only > rely on a full page rendering limit. Tying a CPU limit reduction with the Lua deployment allows us to take advantage of the attention Lua deployers are paying to performance and error generation. If we just introduced a 30s CPU limit for all parsing, that would break many existing articles. Part of the reason we are introducing Lua is to eliminate long parse times which adversely affect user experience. The 10s limit reflects this goal. Experience suggests that the applications will expand to fill the limit, whatever the limit is. For metatemplates, a typical optimisation practice is to start with something ridiculously slow and to optimise it until some large test case stops generating Squid errors. Thus we are left with parse times of around 45s. If we introduced a 10s preprocessor CPU limit when we first introduced templates, then parse times would now be around 7.5s instead (albeit with a reduced set of applications). Requiring that everything be converted to Lua simultaneously in order to achieve <10s parse times is not, in my opinion, the worst possible solution. Weather boxes commonly cause complaints and Squid timeouts, despite their simple function. If I was setting Lua migration priorities, they would probably be first or second on the list. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
