rfc:error-optimizations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:error-optimizations [2010/08/23 22:15] – kalle | rfc:error-optimizations [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2010-08-21 | * Date: 2010-08-21 | ||
* Author: Kalle Sommer Nielsen < | * Author: Kalle Sommer Nielsen < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 74: | Line 74: | ||
<code c> | <code c> | ||
if (EG(error_stack_enabled) && EG(error_stack_size)) { | if (EG(error_stack_enabled) && EG(error_stack_size)) { | ||
- | char *error; | + | char *error |
+ | int error_length; | ||
/* dispatch to formatting function, and copy it into, the " | /* dispatch to formatting function, and copy it into, the " | ||
+ | /* NOTE: This is just a pseudo function name for formatting */ | ||
+ | zend_format_error_arguments(& | ||
- | | + | |
} else { | } else { | ||
/* BC code */ | /* BC code */ | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ==== $php_errormsg ==== | ||
+ | |||
+ | This one is a tricky one, as we do not have any hooks for altering variables at reading, nor do we have JIT assignments. I think the best solution here is to simply remove $php_errormsg and require userland to use error_get_last() if they *REALLY* want the last errors, without depending on the track_errors ini options to be on. | ||
+ | |||
+ | If its not removed, then we cannot gain any optimization with track_errors = On at all, so if thats the case, it has to be taken into account when initializing the error_stack executor globals. | ||
==== Memory usage ==== | ==== Memory usage ==== | ||
Line 88: | Line 97: | ||
Obvious the memory usage here can grow quite rapidly, but people who would use this feature already takes great care of their code to not assume the opposite. | Obvious the memory usage here can grow quite rapidly, but people who would use this feature already takes great care of their code to not assume the opposite. | ||
- | ===== Notes ===== | + | ==== ZTS performance |
- | * This is a very early WIP, the idea may change, or render obsolete | + | Since the error stack is hooked into the executor globals, which requires tsrm_ls to be available |
rfc/error-optimizations.1282601746.txt.gz · Last modified: 2017/09/22 13:28 (external edit)