Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Overhead of Inline::Python?

by bliako (Monsignor)
on Jun 19, 2019 at 07:56 UTC ( [id://11101547]=note: print w/replies, xml ) Need Help??


in reply to Overhead of Inline::Python?

Shelling out or inlining once per file will cost you - that's common sense. If you can compile a list of files to transfer first, via Perl, which then you send *once* to the python script, shelling out or inlining cost will be much less / insignificant.

Alternatively: modify the python script to sit in a loop and wait until it receives via socket the fullpath to a file to be transfered. Once there is something in the queue, python will transfer it. Then via Perl you decide what files to send and just communicate their names to the python "server". You will have the cost of only opening a local socket connection for each file. I assume perl+python scripts sit locally and communicate to the provider's remote server. So, you communicate to python the filename on local disk.

bw, bliako

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11101547]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found