Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 96e4be5d769a27c031f3d231f0b97bc2896d434e
Ticket: 3563391fffffffffffffffffffffffffffffffff
Drop unused SpBucket fields
User & Date: vasiljevic on 2012-09-13 16:54:21
Changes

  1. icomment:
    The "lockt" has been removed.
    The "freeCt" is used in the code as the top of free container list 
    (similar to the list of pre-allocated Tcl Objs) and cannot be removed.
    
    The NUMSPBUCKETS is a count of slots containing shared arrays.
    Instead of locking the array during access, the slot (bucket) containing 
    the array is locked. Arrays are distributed among buckets using a simple
    hash that maps the array name into one of the buckets. 
    The whole logic was "borrowed" from AOL/Naviserver.
    Setting the value larger will reduce locking contention for the bucket
    and thus allow more concurrency. Unfortunately we do not have any
    metrics built into the code that would allow locking introspection and
    finding "hot" buckets. This would be necessary in order to experiment
    with the number of buckets. The value of 32 is found to be "good enough"
    for most of the applications.  
    
    
    
  2. login: "vasiljevic"
  3. mimetype: "text/plain"
  4. username: "vasiljevic"