Hello,
Please note that the time needed to generate a DOCX is not related to the file size but to the contents.
The addTable method is the line that takes more time in your script. Your code is generating a table with 1250 complex contents (WordFragments) that generate 70.000 internal XML lines that must be filled, parsed and cleaned. We have run your code using a test server and it takes 4s to process the whole table and generate the DOCX.
There's no way to improve the taken time to run the script but adding smaller tables instead of a huge table. Instead of one big table, you could generate five smaller tables (each table with 50 rows) to improve the performace.
Regards.