We have a project where we need to move files from a windows server to google workspace.
On the server are many .msg files.
I would like to convert them to .doc for instance.
Currently I have the following code :
Please … when you post code, sample data, console output or error messages format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Hmmm … actually not yet … despite you declaire but you don’t use the variables $word and $attachment and the quite costly logging the code seems to be just fine. I’d probably remove all the logging if I’m looking for speed (file system operations are usually quite slow - if you need logging collect the information in a varialbe and write them all together at once at the end) but appart from that … And since you say …
… the code itself does not seem to be the issue here. If you have such a big difference between running it on a client and on a server what’s the difference between them? I assume the files you’re about to process with the script are local to the computer the code runs on, right?
If there is a bottleneck in your code you should measure where it is. Otherwise you may waste a lot of energy optimizing code for a benefit not worth it.