Not Responding When Dealing with Large Data

Paul McNett paul at mcnettware.com
Wed Jun 18 15:23:56 EDT 2014


On 6/18/14, 10:20 AM, cutey Love wrote:
> I'm trying to read in 100000 lines of text, use some functions to edit them and then return a new list.

How is it that you are opening the file, and iterating the contents?

> The problem is my program always goes not responding when the amount of lines are a high number.

What do you mean, "goes not responding"? What environment are you 
running in? Windows and IDLE?

> I don't care how long the program takes to work, just need it to stop crashing?

Note that "not responding" isn't the same as crashing. If your program 
crashed, it would likely print on your terminal something like:

Traceback (most recent call last):
... lots of lines including useful information about the problem

or

Segmentation Fault

If it just goes "not responding" for a while in your tight loop, it 
could simply mean just that: your IDE or whatever is focusing so hard on 
running your program that there aren't any cycles to say "still here" to 
the OS, so the OS has no clue what's going on and says to the user "not 
responding".

Have you waited to see if it ever completes?

Paul




More information about the Python-list mailing list