[wingide-users] Code causes 99% CPU utilization

John Venable john.venable at bisys.com
Wed Jan 25 16:17:17 EST 2006


This snippet of code causes the IDE to go to 99% CPU utilization:

 

    def replaceVars(self, msgbuff, prcdate, totalItems, totalAmount,
account, dept):

        retBuff = []

        for x in msgbuff:

            line = x.replace('<ACCOUNT>', account)

            line = line.replace('<ACCOUNT1>', self.Mask('#', 1,
account))

            line = line.replace('<ACCOUNT2>', self.Mask('#', 2,
account))

            line = line.replace('<ACCOUNT3>', self.Mask('#', 3,
account))

            line = line.replace('<ACCOUNT4>', self.Mask('#', 4,
account))

            line = line.replace('<ACCOUNT5>', self.Mask('#', 5,
account))

            line = line.replace('<ACCOUNT6>', self.Mask('#', 6,
account))

            line = line.replace('<ACCOUNT7>', self.Mask('#', 7,
account))

            line = line.replace('<ACCOUNT8>', self.Mask('#', 8,
account))

            line = line.replace('<ACCOUNT9>', self.Mask('#', 9,
account))

            line = line.replace('<ACCOUNT10>', self.Mask('#', 10,
account))

            line = line.replace('<ACCOUNT11>', self.Mask('#', 11,
account))

            line = line.replace('<ACCOUNT12>', self.Mask('#', 12,
account))

            line = line.replace('<ACCOUNT13>', self.Mask('#', 13,
account))

            line = line.replace('<ACCOUNT14>', self.Mask('#', 14,
account))

            line = line.replace('<ACCOUNT15>', self.Mask('#', 15,
account))

            line = line.replace('<ACCOUNT16>', self.Mask('#', 16,
account))

            line = line.replace('<ACCOUNT17>', self.Mask('#', 17,
account))

            line = line.replace('<ACCOUNT18>', self.Mask('#', 18,
account))

            line = line.replace('<ACCOUNT19>', self.Mask('#', 19,
account))

            line = line.

 

Just create a new file and paste this into the buffer. The first edit
will cause the CPU overload (at least on my machine)...

 

I am running Wing IDE Professional version 2.0.4-1 on Windows XP pro - 1
Gig of RAM...

 

I am guessing this is a problem in the code completion thread...

 

Thanks in advance,

 

John Venable

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20060125/0b2ce541/attachment.htm


More information about the wingide-users mailing list