My Table Actions Hang

nycdude

Пользователь
Joined
May 6, 2018
Messages
57
Reaction score
1
Points
8
I don't know if this is a settings issue or not, but the problems I'm getting are with table action blocks in ProjectMaker. It's so odd, because I'll make a project in ProjectMaker that runs so good, but then it all goes to $hit. I've suspected it because of the file sizes I'm using, but that seems to be hit or miss because it sometimes runs big lists with ease then stop working, and when I test with smaller files it still doesn't work.

What I'm saying is I have to use Task Manager to shut it all down because PM hangs forever.

It's just my table blocks, as far as error logs I don't have much to go on because I have to use Task Manager to shut it all down without a report.

I have plenty of memory, strong i7 processor etc, is there something in my settings I can adjust to using more resources I should know about?

Thanks, sorry for being such as slow learning noob hehe :-)
 

jose

Новичок
Joined
Mar 28, 2019
Messages
7
Reaction score
0
Points
1
are you selecting the right delimeter so that PM is able to correctly load the data?
 

EtaLasquera

Client
Joined
Jan 2, 2017
Messages
527
Reaction score
113
Points
43
When we face that problem, we split text or tables into smaler files.
 
  • Thank you
Reactions: nycdude

nycdude

Пользователь
Joined
May 6, 2018
Messages
57
Reaction score
1
Points
8
When we face that problem, we split text or tables into smaler files.
Yep, this is the same conclusion I'm coming up with. Are there some settings I can adjust to get maximum resources used for file processing?
 

EtaLasquera

Client
Joined
Jan 2, 2017
Messages
527
Reaction score
113
Points
43
You will need two variables:
1. outputDir - The destination of your splited files, remember, the outputdir must end with "\"
2. bigFile - The big file who you want to split

Code:
//large files will receive a memmory error, split it
string directory = project.Variables["outputDir"].Value; //ex.: C:\temp\splitfiles\ << need this last "\"!
System.IO.Directory.CreateDirectory(directory);
int lines = 0;
int files = 1;
string line;
System.IO.StreamWriter swWriter = new System.IO.StreamWriter(directory+"file.txt");
System.IO.StreamReader swReader = new System.IO.StreamReader(project.Variables["bigFile"].Value);
while ((line = swReader.ReadLine()) != null)
{
  swWriter.WriteLine(line);
  lines++;

  if (lines >= 500 )
  {
  swWriter.Close();
  swWriter = null;
  swWriter = new System.IO.StreamWriter(directory+"file" + files + ".txt"); //splited files
  files++;
  lines = 0;
  }
}

swReader.Close();
swWriter.Close();
 
  • Thank you
Reactions: nycdude

nycdude

Пользователь
Joined
May 6, 2018
Messages
57
Reaction score
1
Points
8
You will need two variables:
1. outputDir - The destination of your splited files, remember, the outputdir must end with "\"
2. bigFile - The big file who you want to split

Code:
//large files will receive a memmory error, split it
string directory = project.Variables["outputDir"].Value; //ex.: C:\temp\splitfiles\ << need this last "\"!
System.IO.Directory.CreateDirectory(directory);
int lines = 0;
int files = 1;
string line;
System.IO.StreamWriter swWriter = new System.IO.StreamWriter(directory+"file.txt");
System.IO.StreamReader swReader = new System.IO.StreamReader(project.Variables["bigFile"].Value);
while ((line = swReader.ReadLine()) != null)
{
  swWriter.WriteLine(line);
  lines++;

  if (lines >= 500 )
  {
  swWriter.Close();
  swWriter = null;
  swWriter = new System.IO.StreamWriter(directory+"file" + files + ".txt"); //splited files
  files++;
  lines = 0;
  }
}

swReader.Close();
swWriter.Close();
Will definitely give this try, thanks man.
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)