NetTalk Central

Author Topic: Passing P_web as parameter - expense?  (Read 885 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
    • Email
Passing P_web as parameter - expense?
« on: August 04, 2023, 02:55:04 AM »
Hi,

I have a logging/trace/debug procedure that logs events in my web app.

One of the parameters currently is p_web.

Just trying to figure out,
if I have lots of calls to the debug log procedure with the p_web as a parameter,
but only to return without action because global debug is switched off.
How bad is this?

thanks

Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Passing P_web as parameter - expense?
« Reply #1 on: August 04, 2023, 09:24:07 PM »
Passing objects as parameters is fast (basically it's a pointer being passed).
So there's "some overhead" in pushing the pointer onto and off of the stack, but since those are simple instructions that take next to no time, this practice is not expensive at all.