Webpython - Testing in progress

Currently I am running tests on WebPython which is Python with FastCGI enabled at the interpreter level.

Partial Testing Results:

All tests were done on Acer E5-553-T4PT laptop running AMD A10 9600P 4 core  X86_64 Processor with 16GB RAM and 1TB harddisk.
Browser Used: Firefox 57

Ran the GET and POST query to some python scripts which each generate around 150kB of data. The results prove something strange, Python's parsing of a file eats up a lot of time, wasn't expecting this. The larger the file the execution takes longer.

printbig.py print 157KB of data in around 1010 python write statements and the best time I got was 48ms.

printbigcollective.py prints around 157KB but single write statement but there were around 1010 concatenations of strings and lines and the best time I got was 44ms.
printbig2.py

printbig2.py prints around 160KB of data but in 29 lines of code the file size is still around 160KB of data and the best time I got was 35ms.

And here is the real Kicker.

testpost.py prints around 160KB of data that is first read from the browser using stdin stream and then it uses a single write to dump all the data back to the browser in text/plain content type and the best time I got was 36ms. Which means it read 160KB of data and printed 160KB of data back to the browser in nearly the same speed as printbig2.py which only prints 160KB of data. In this case the number of lines of code was 4.

Will run some more tests and update the blog. Till then here are the best times screenshots.






Comments

Popular Posts