Changeset 1485

Show
Ignore:
Timestamp:
07/10/08 18:14:52 (4 months ago)
Author:
rob
Message:

Turned off threaded loading of FundamentalMode? when loading stuff from the local filesystem
* speeds up file loading in most cases, possible loss of user interface responsiveness if happen to load over a shared drive that gets knocked out in the middle.

Location:
trunk/peppy
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/buffers.py

    r1443 r1485  
    603603     
    604604    def allowThreadedLoading(self): 
    605         return self.modecls.allow_threaded_loading 
     605        return self.modecls.preferThreadedLoading(self.user_url) 
    606606     
    607607    def clone(self): 
  • trunk/peppy/fundamental.py

    r1481 r1485  
    198198        self.spell = None 
    199199 
     200    @classmethod 
     201    def preferThreadedLoading(cls, url): 
     202        # For Fundamental mode and its descendants (unless overridden), 
     203        # threaded loading is disabled by default when loading from the local 
     204        # filesystem 
     205        if url.scheme == "file": 
     206            return False 
     207        return True 
     208 
     209 
    200210    def createWindowPostHook(self): 
    201211        """Apply settings for the STC""" 
  • trunk/peppy/major.py

    r1482 r1485  
    533533        """ 
    534534        return None 
     535     
     536    @classmethod 
     537    def preferThreadedLoading(cls, url): 
     538        """Returns preference for using threaded loading of the given URL 
     539         
     540        Loading a file in a background thread is possible in peppy, but it 
     541        does cause a noticeable delay when loading a file from the local 
     542        filesystem.  This class method is provided to allow each major mode to 
     543        state its preference for threaded loading. 
     544         
     545        Note that this preference will not be honored if the global setting for 
     546        threaded loading is disabled. 
     547        """ 
     548        return True 
     549 
    535550 
    536551    def save(self, url=None):