Python Forum
Effeciency of passing XML tree object as function arguments
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Effeciency of passing XML tree object as function arguments
#1
Hi all, 

Is it efficient to pass an object returned by lxml.etree.parse("a.xml") as argument to other functions? Is the object returned a C pointer-like mechanism referring to the in-memory tree representation of XML? Or is it something else? Will it cause any performance issues down the line? I expect the size of the tree when taken in-memory could be around 15 MB. 

I am planning to write multiple functions to process each child node and its sub-child nodes. To each function. I will be passing the object corresponding to child node. 

Thanks
Sandeep
Reply


Messages In This Thread
Effeciency of passing XML tree object as function arguments - by sandeepvl - Oct-11-2016, 07:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 424 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  Passing writable arguments to functions. Assembler 11 1,020 Jan-15-2024, 11:32 PM
Last Post: sgrey
  calling external function with arguments Wimpy_Wellington 7 1,461 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,402 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  passing dictionary to the function mark588 2 988 Dec-19-2022, 07:28 PM
Last Post: deanhystad
  Passing string functions as arguments Clunk_Head 3 1,268 Jun-15-2022, 06:00 AM
Last Post: Gribouillis
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,653 Mar-28-2022, 04:42 PM
Last Post: Larz60+
  'namespace' shorthand for function arguments? shadowphile 5 2,617 Aug-11-2021, 09:02 PM
Last Post: shadowphile
  Checking the number of arguments a function takes Chirumer 3 2,170 Jul-06-2021, 04:56 PM
Last Post: Chirumer
  Passing flags to python script, through a function xbit 4 3,998 Apr-20-2021, 06:32 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020