- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-08-2024 02:25 AM - edited 08-09-2024 12:44 AM
Hi everyone,
Lately, I was wondering about Python and JavaScript performance in terms of computational speed and XSOAR resource use. I'd like to work as efficient as possible and that's the reason I'd like to ask for the XSOAR community thoughts.
I'm currently working with Python 3.11.9 (main, Aug 2 2024, 14:46:25) [GCC 13.2.1 20240309] (I don't really know what JavaScript version/Node.js version use XSOAR in general).
I replicated this video in XSOAR (Python vs JavaScript - side by side comparison - YouTube) and I read some papers which speaks about this theme, and everyone tells that JavaScript is faster than Python by far. However, in my tests, Python demonstrated that is ~ 60% faster than Javascript.
What r u thoughts? What programming language the community usually use to? Is there an official post about this?
All the best
08-20-2024 05:12 PM
Hey there! You can refer to this documentation regarding the python scripting you can use in xsoar. You can use both Javascript and Python but I am not sure we have any performance benchmarks regarding the same.
08-21-2024 02:38 AM
python will work slower but not because of interpreter but because using docker to execute. I mean any python code will run in docker container and if there is no specific docker containers to reuse in current time it will need some time to spawn one and run the payload.
In very general if you have some small code snippet you can write it in JS but otherwise I will prefer python and not because of speed but because it's isolated in container, supports external libs etc.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!