Changeset 634


Ignore:
Timestamp:
01/05/10 19:54:35 (4 years ago)
Author:
jortel
Message:

Add Ticket 291 optimization; replace string concatenation with using a character buffer (list) which is joined at the end.

Location:
trunk/suds
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/suds/__init__.py

    r633 r634  
    3030 
    3131__version__ = '0.3.9' 
    32 __build__="(beta) R633-20091223" 
     32__build__="(beta) R634-20100105" 
    3333 
    3434# 
  • trunk/suds/sax/parser.py

    r631 r634  
    6060                continue 
    6161            node.append(attribute) 
     62        node.charbuffer = [] 
    6263        top.append(node) 
    6364        self.push(node) 
     
    7879        name = unicode(name) 
    7980        current = self.top() 
     81        if len(current.charbuffer): 
     82            current.text = Text(u''.join(current.charbuffer)) 
     83        del current.charbuffer 
    8084        if len(current): 
    8185            current.trim() 
     
    8993        text = unicode(content) 
    9094        node = self.top() 
    91         if node.text is None: 
    92             node.text = Text(text) 
    93         else: 
    94             node.text += text 
     95        node.charbuffer.append(text) 
    9596 
    9697    def push(self, node): 
Note: See TracChangeset for help on using the changeset viewer.