Tcl Source Code

View Ticket
Login
Ticket UUID: 1084013
Title: resolver: performance bug
Type: Bug Created on: 2004-12-12 21:05:00
Submitter: msofer Assigned to: msofer
Subsystem: 07. Variables Severity:
Priority: 5 Medium Last modified: 2005-01-07 18:27:45
Status: Open Closed by:
Resolution: None Closed on:
Version: None
Description:
All procsand scripts in a namespace are recompiled when
a namespace's variable resolver changes; I have not
looked up if the situation is the same for interpreter
resolvers.

This is a performance bug, as the bytecodes do not
change with changes in the variable resolvers. Probably
not too expensive, as I doubt that any extension is a
frequent-resolver-updater.

Note that currently this behaviour is *mandatory*, as
the variable resolver epoch has been used to signal a
necessary recompilation when bcc'ed commands are
shadowed - the fix for [Bug 231259] exploits this buggy
behaviour.
User Comments:
msofer added on 2005-01-07 18:27:45:
Logged In: YES 
user_id=148712

Another performance bug: the variable resolver is called
repeatedly at proc loadtime, once per local variable. It
would be more efficient to call it once, and let it
initialise all variables in that single call (ie, take over
the job of InitCompiledLocals)