Changeset 838

Show
Ignore:
Timestamp:
09/13/05 14:44:38 (3 years ago)
Author:
tzanko
Message:

Hopefully fixed performance issues in #11

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nbshell/trunk/ChangeLog

    r836 r838  
    112005-09-13  Tzanko Matev  <tsanko@gmail.com> 
     2 
     3    * editwindow.py (EditWindow.__config): Turned Python lexer off. It 
     4    caused lagging, and was the reason for the performance issues 
     5    described in ticket #11. This should solve the problem 
    26 
    37    * IPythonLog.py (IPythonLog.filename_iter): Changed generation of 
  • nbshell/trunk/nbshell/IPythonLog.py

    r836 r838  
    3232from lxml import etree 
    3333 
    34 from nbshell.utils import findnew 
     34from nbshell.utils import * 
    3535 
    3636#TODO: Fix the plotting API 
     
    233233        """ This methods runs the input lines. """ 
    234234        #print 'running code...' #dbg 
    235          
     235        #delta_time('__run: start') 
    236236        print 'In[%d]: '%cell.number,cell.input #dbg 
    237237        self.output = '' #used by displayhook to store output 
     
    245245                                      displayhook = self.displayhook,\ 
    246246                                      stdout = cout, stderr = cerr) 
    247          
     247        #delta_time('__run: code run') #dbg 
    248248        #Retrieve stdout 
    249249        text = '\n' + cout.getvalue() 
     
    255255                                  for x in text.splitlines(False)]) #wrap stdout 
    256256        cout.close() 
    257          
     257        #delta_time('__run: handled stdout') #dbg 
    258258        #Retrieve stderr 
    259259        text = '\n' + cerr.getvalue() 
     
    265265                                  for x in text.splitlines(False)]) #wrap stderr 
    266266        cerr.close() 
     267        #delta_time('__run: handled stderr') #dbg 
    267268         
    268269        if self.output != '': 
     
    270271                                   for x in self.output.splitlines(False)]) #wrap the output 
    271272            #print 'wrapped output ->', self.output.text #dbg 
     273        #delta_time('__run: handled output') #dbg 
    272274 
    273275        print 'Out[%d]: '%cell.number, cell.output #dbg 
  • nbshell/trunk/nbshell/PythonPlugin.py

    r836 r838  
    366366        #self.promptlen[i] holds the length of the prompt of cell i 
    367367        self.promptlens = [] 
     368        #delta_time('Update start') #dbg 
    368369        for i, cell in enumerate(cells): 
    369370            number =  cell.number 
     
    424425            #self.line2log.append(None) #append ane 
    425426            #empty line at the end outtext.write('\n') 
     427        #delta_time('Update cycle end') #dbg 
    426428        self.window.SetText(outtext.getvalue()) 
     429        #delta_time('Text drawn on screen') #dbg 
    427430        self.window.GotoPos(self.window.GetTextLength()) 
     431        #delta_time('Update end') #dbg 
    428432        #print "line2log->", self.window.line2log #dbg 
    429433 
  • nbshell/trunk/nbshell/PythonWidget.py

    r836 r838  
    214214        # Prevent modification of previously submitted 
    215215        # commands/responses. 
    216         if not self.view.CanEdit(): 
    217             return 
     216        #if not self.view.CanEdit(): #TODO: why is this here? We already checked in OnKeyDown 
     217        #    return 
    218218        key = event.KeyCode() 
    219219        currpos = self.GetCurrentPos() 
  • nbshell/trunk/nbshell/editwindow.py

    r823 r838  
    107107        #self.SetMarginWidth(1, 40) 
    108108 
    109         self.SetLexer(stc.STC_LEX_PYTHON) 
     109        #self.SetLexer(stc.STC_LEX_PYTHON) 
    110110        self.SetKeyWords(0, ' '.join(keyword.kwlist)) 
    111111