when generate 10000 matrix bar code it take too much time How to make

Posted by Ahmedsa under Windows Forms on 5/7/2017 | Points: 10 | Views : 125 | Status : [Member] | Replies : 1
When generating matrix 2d bar code it take per 10000 files matrix bar code generating it take 1 minute
so that how to generating matrix bar code 2d in less time as seconds .
my code as below under button generating :

Class1 CLS = new Class1();
DataTable dt = CLS.ShowalldataSerial(textBox4.Text);

for (int i = 0; i <= Convert.ToInt32(textBox1.Text); i++)
Serial = SRL.Rnd().ToString();
txt = "UserID" + dt.Rows[0][0] + "FirmName" + dt.Rows[0][1] + "OrderNo" + dt.Rows[0][2] + "BtachNo" + dt.Rows[0][3] + "Quantity" + dt.Rows[0][4] + "ProductName" + dt.Rows[0][5] + "SerialNo" + Serial;

dm.DM(txt, Color.FromName(comboBox1.SelectedItem.ToString()), Color.White).Save(root + "\\" + Serial + ".emf", System.Drawing.Imaging.ImageFormat.Emf);

MessageBox.Show("Records generated success ");

when create 10000 in textbox1 it take minute if i write

200000 in textbox1 it take 20 minutes

Code working without any problem and give me result what i need

but it slowly generating data matrix per big quantities

so that what i do to make generating matrix bar code very fast .


Posted by: Jitendrasoft09 on: 5/13/2017 [Member] [MVP] Starter | Points: 25

Better to use connected oriented structure like DataReader to perform fast execution, added nicely in below thread link-

Jitendra Kumar
If my post helps you, plz mark as an answer.

Ahmedsa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response