onesiphore / php-smtp-email-validation

Automatically exported from code.google.com/p/php-smtp-email-validation
0 stars 0 forks source link

How to add multithread ?? #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Current it run and very slow
2. How to add multithread to this tool

Original issue reported on code.google.com by brainq...@gmail.com on 14 Sep 2012 at 12:43

GoogleCodeExporter commented 8 years ago
Start multiple instances of this class on different email lists. 

Original comment by g...@fijiwebdesign.com on 14 Sep 2012 at 2:29

GoogleCodeExporter commented 8 years ago
yes, so how to add multithread to this, can up to 10 or 100 thread ?

Original comment by brainq...@gmail.com on 14 Sep 2012 at 2:36

GoogleCodeExporter commented 8 years ago
i think create multithread to both: Different and other email list

Original comment by brainq...@gmail.com on 14 Sep 2012 at 2:43

GoogleCodeExporter commented 8 years ago
The process is slow due to network latency, not CPU. You just need to run more 
in parallel so you use up more network bandwidth. Run as many as you want at 
the same time, 10 or 100. 

eg:

php /path/to/phpfile.php list/of/emails1.txt &
php /path/to/phpfile.php list/of/emails2.txt &
php /path/to/phpfile.php list/of/emails3.txt &
php /path/to/phpfile.php list/of/emails4.txt &
etc....

Where phpfile.php reads the emails from emails[x].txt and validates. 

Original comment by g...@fijiwebdesign.com on 14 Sep 2012 at 2:49

GoogleCodeExporter commented 8 years ago
Yes, this for many file. and if multithread for 1 file in process: can valid 
one time multi email: like 10 or 100 emails

Original comment by brainq...@gmail.com on 14 Sep 2012 at 2:57