• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Using Xdebug to profile PHP on pfSense

Scheduled Pinned Locked Moved Development
6 Posts 2 Posters 2.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    luckman212 LAYER 8
    last edited by May 4, 2022, 11:39 AM

    I'm trying to get a handle on what's causing my slow dashboard load times. See post.

    Was wondering about using Xdebug to do some profiling of the PHP execution. Is that still possible with the latest snapshots? I do remember playing around with it circa 2018 and getting it hooked up via VSCode extension, but it's been a while.

    I see https://docs.netgate.com/pfsense/en/latest/development/additional-php-modules.html mentions it but doesn't have much detail on usage.

    1 Reply Last reply Reply Quote 0
    • L luckman212 referenced this topic on May 4, 2022, 11:40 AM
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by May 4, 2022, 12:38 PM

      We used to include the xdebug module but we dropped it in ~2018 because it failed to build with the PHP version we were upgrading to. We never looked into it again after since nobody seemed to care and it was extra technical debt we didn't want to keep carrying.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      L 1 Reply Last reply May 4, 2022, 2:00 PM Reply Quote 0
      • L
        luckman212 LAYER 8 @jimp
        last edited by May 4, 2022, 2:00 PM

        @jimp Ok, that's what I thought. How do you guys debug performance then? Is there another way? Or can the module be compiled on another FreeBSD system and then copied over?

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by May 4, 2022, 2:08 PM

          I'm not sure what the other devs do there. I rarely dig into those kinds of problems, though in some cases it's fairly obvious if you watch the network pane on the browser debug as it requests/receives data and you can see which things take longer to come back.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          L 1 Reply Last reply May 4, 2022, 2:50 PM Reply Quote 0
          • L
            luckman212 LAYER 8 @jimp
            last edited by May 4, 2022, 2:50 PM

            @jimp Nope all I get is 1 giant bar for the initial pageload, so no real insight on the debug console. E.g.

            3bc97951-780f-4179-a225-5a08ebb6032c-CleanShot 2022-05-04 at 10.48.35.png

            Unless you think there's a reason why it definitely won't work, I guess I can try my other idea of compiling the module(s) on another FreeBSD 12.3 system and moving them over.

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by May 4, 2022, 5:35 PM

              If it compiles against the same version of PHP it should be OK. At the time it was removed it was broken and I'm not sure if anyone fixed it, but give it a shot. Maybe upstream did something different in the meantime it has been a few years.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received