Jump to content
adrian

Tracy Debugger

Recommended Posts

Remember that if you are a superuser and you have "force su into dev mode" checked, then switching modes won't affect the mode you actually see. How is the performance when you are logged out?

Tracy adds content to the DOM, so it should slow things down if anything. 

Is Tracy logging any errors (even Notices / Warnings)? Do you have any ajax calls - just wondering if Tracy is catching an error early that would otherwise slow things down for some reason?

Are you talking about  the backend or the frontend of the site being slow? Are they both slow with Tracy disabled?

Does Tracy still speed things up with all panels disabled? If not, which particular panel is increasing the speed?

 

Share this post


Link to post
Share on other sites

"force su into dev mode" is not checked and there are no errors or warnings

I didn't checked all panels, but It's enough to add one of them: ProcessWire Info or Request Info or Console or Panel Selector.

It's not speeding up with i.e. Tracy Logs or ProcessWire Logs

Backend works normal exept the pagetree. pagetree takes longer than usual.

Share this post


Link to post
Share on other sites

Another interessting thing is that the frontend seems to slow down only when logged in as superuser. For guests the Site seems to work normal.

Share this post


Link to post
Share on other sites
1 minute ago, Kholja said:

Another interessting thing is that the frontend seems to slow down only when logged in as superuser. For guests the Site seems to work normal.

Is this speed affected by Tracy at all? Keep in mind that PW's core debug mode kicks in (if it's enabled) when logged in as superuser so there will be some impact from that.

33 minutes ago, Kholja said:

I didn't checked all panels, but It's enough to add one of them: ProcessWire Info or Request Info or Console or Panel Selector.

It's not speeding up with i.e. Tracy Logs or ProcessWire Logs

I honestly have no idea at this point - I can't see why/how those panels could improve the page tree loading speed - for me the page tree ajax call is definitely noticeably slower with Tracy running - obviously it's a trade-off that I think is worth it though.

Share this post


Link to post
Share on other sites
2 minutes ago, adrian said:

Is this speed affected by Tracy at all? Keep in mind that PW's core debug mode kicks in (if it's enabled) when logged in as superuser so there will be some impact from that.

Definitely it affects the Frontend. I think a difference by factor about 20 (300ms -> 6s server response time) is probably not caused by the core. In terms of the backend I'm not sure if I'm starting to see ghosts... the impact there is not that big.
Anyway - thanks for your precious input adrian. If i find out more I will post it here.

Share this post


Link to post
Share on other sites
7 minutes ago, Kholja said:

Definitely it affects the Frontend. I think a difference by factor about 20 (300ms -> 6s server response time)

Is this on all pages or just pages of certain templates?

 

Share this post


Link to post
Share on other sites

It's affecting all templates. I created a test template with only a few fields. It has the same bad performance.

Share this post


Link to post
Share on other sites

I exported the site with ryans ProcessExportProfile Module and did a fresh install. This solved the problem. But would be nice to know what caused the issue.
Thanks Adrian for your quick  response and your support. Your posts were often helpful und a good resource for learning 🙂

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Kholja said:

I exported the site with ryans ProcessExportProfile Module and did a fresh install. This solved the problem. But would be nice to know what caused the issue.

Weird - definitely keep us up to date if you find out why.

Share this post


Link to post
Share on other sites
On 2/10/2020 at 8:49 AM, bernhard said:

Thx, I'm done with my testing - asking earlier would have saved me some hundred clicks 😄 😛


$options[Dumper::COLLAPSE] = 14;
$options[Dumper::COLLAPSE_COUNT] = 7;

This worked well. It would be nice to have an option somewhere for this, but it is definitely not high priority, so don't hurry. Thx anyhow for taking it into account! 🙂 

Hey @bernhard - those are now the defaults (as per the Tracy core defaults). They are also configurable in the module settings:

image.thumb.png.279d2ad1eead8e148568c28f834575c2.png

and you can also override them for a specific dump with:

d($obj, 'title', ['collapse' => 1, 'collapse_count' => 1]);

which might be handy if you are dumping lots of the same object/array in a loop and you don't want them all open which not only takes up more physical space, but also more reources.
 

  • Like 2

Share this post


Link to post
Share on other sites

Just dumping a note here for others. If anyone notices slowness with Tracy enabled, especially when quite a few modules are active, try using php-fpm. I just switched my local set up of homebrew apache + homebrew php 7.4 over to php-fpm instead of mod_php and it has really sped things up. Also been mucking around with the database for the site I am working on, didnt realise I was on MyISAM, so maybe switching to INNODB has had something to do with it as well.

Share this post


Link to post
Share on other sites

Does anybody know the keyboard shortcut for the multi-cursor feature of ACE? I'm using CTRL-D in VSCode but that does delete the current line in ACE. Multicursor does work though, because I can select multiple items using CTRL+click. Thx!

Share this post


Link to post
Share on other sites

Is ACE Tracy's console editor? If so, then ALT-GR works for me (Windows).

Share this post


Link to post
Share on other sites
30 minutes ago, bernhard said:

Does anybody know the keyboard shortcut for the multi-cursor feature of ACE?

CTRl or CMD + click where you want each extra cursor to be.

Oops, sorry, I guess you already mentioned you had this approach working 🙂

Share this post


Link to post
Share on other sites

I'm sorry, I was not precise enough! 😅 See this example:

3WVbDyG.png

The cursor is on the first $out variable and all other occurrances are outlined, so I guess there is a way to select all of them (VSCode CTRL+F2) or one by one (VSCode CTRL-D). This is how it looks in VSCode:

OsUz7Wp.gif

Share this post


Link to post
Share on other sites

In ACE Editor (on a Mac at least), you can do this sort of stuff by using CTRL+ALT + Arrow Down (or Up). Does that do what you want?

UdwJQhutMI.gif.a8011691523abcb524d7efb84f28c1d8.gif

8b4ySpjkEY.gif.978b68768fb0b94a5e5e3dae42699577.gif

Share this post


Link to post
Share on other sites

Thank you very much adrian, not exactly, because that won't work on the last line where $out is prepended by "d(". But I found a list of shortcuts 🙂 https://defkey.com/ace-editor-shortcuts

It's CTRL-ALT-left/right

Not sure if that is an official list, but it might be nice adding a link to the console or inside the keybord shortcuts popup?

QfT2GYL.png

Share this post


Link to post
Share on other sites

Great! Yeah I just did a quick websearch and my link was the first result 🙂 

Share this post


Link to post
Share on other sites

@bernhard - I've added that link to the keyboard shortcuts dialog in the latest version. I've also added that dialog to the FileEditor panel.

image.png.ca5f74e7a1e18366564f843013a6afe8.png

  • Thanks 1

Share this post


Link to post
Share on other sites

Great, thank you adrian! I hope it also helps others 🙂 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By joshua
      This module is (yet another) way for implementing a cookie management solution.
      Of course there are several other possibilities:
      - https://processwire.com/talk/topic/22920-klaro-cookie-consent-manager/
      - https://github.com/webmanufaktur/CookieManagementBanner
      - https://github.com/johannesdachsel/cookiemonster
      - https://www.oiljs.org/
      - ... and so on ...
      In this module you can configure which kind of cookie categories you want to manage:

      You can also enable the support for respecting the Do-Not-Track (DNT) header to don't annoy users, who already decided for all their browsing experience.
      Currently there are four possible cookie groups:
      - Necessary (always enabled)
      - Statistics
      - Marketing
      - External Media
      All groups can be renamed, so feel free to use other cookie group names. I just haven't found a way to implement a "repeater like" field as configurable module field ...
      When you want to load specific scripts ( like Google Analytics, Google Maps, ...) only after the user's content to this specific category of cookies, just use the following script syntax:
      <script type="optin" data-type="text/javascript" data-category="statistics" data-src="/path/to/your/statistic/script.js"></script> <script type="optin" data-type="text/javascript" data-category="marketing" data-src="/path/to/your/mareketing/script.js"></script> <script type="optin" data-type="text/javascript" data-category="external_media" data-src="/path/to/your/external-media/script.js"></script> <script type="optin" data-type="text/javascript" data-category="marketing">console.log("Inline scripts are also working!");</script> The type has to be "optin" to get recognized by PrivacyWire, the data-attributes are giving hints, how the script shall be loaded, if the data-category is within the cookie consents of the user. These scripts are loaded asynchronously after the user made the decision.
      If you want to give the users the possibility to change their consent, you can use the following Textformatter:
      [[privacywire-choose-cookies]] It's planned to add also other Textformatters to opt-out of specific cookie groups or delete the whole consent cookie.
      You can also add a custom link to output the banner again with a link / button with following class:
      <a href="#" class="privacywire-show-options">Show Cookie Options</a> <button class="privacywire-show-options">Show Cookie Options</button> This module is still in development, but we already use it on several production websites.
      You find it here: PrivacyWire Git Repo
      Download as .zip
      I would love to hear your feedback 🙂
      CHANGELOG
      0.0.5 Multi-language support included completely (also in TextFormatter). Added possibility to async load other assets (e.g. <img type="optin" data-category="marketing" data-src="https://via.placeholder.com/300x300">) 0.0.4 Added possibility to add an imprint link to the banner 0.0.3 Multi-language support for module config (still in development) 0.0.2 First release 0.0.1 Early development
    • By MoritzLost
      This is a new module that provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
      The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
      Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
      An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
      Beta release
      Note that I consider this a Beta release. Since the module is relatively aggressive in deleting some caches, I would advise you to install in on a test environment before using it on a live site.
      Let me know if you're getting any errors, have trouble using the module or if you have suggestions for improvement!
      In particular, can someone let me know if this module causes any problems with the ProCache module? I don't own or use it, so I can't check. As far as I can tell, ProCache uses a folder inside the cache directory to cache static pages, so my module should be able to clear the ProCache site cache as well, I'd appreciate it if someone can test that for me.
      Future plans
      If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
      Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
      Links
      https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory

    • By David Karich
      Admin Page Tree Multiple Sorting
      ClassName: ProcessPageListMultipleSorting
      Extend the ordinary sort of children of a template in the admin page tree with multiple properties. For each template, you can define your own rule. Write each template (template-name) in a row, followed by a colon and then the additional field names for sorting.
      Example: All children of the template "blog" to be sorted in descending order according to the date of creation, then descending by modification date, and then by title. Type:
      blog: -created, -modified, title  Installation
      Copy the files for this module to /site/modules/ProcessPageListMultipleSorting/ In admin: Modules > Check for new modules. Install Module "Admin Page Tree Multible Sorting". Alternative in ProcessWire 2.4+
      Login to ProcessWire backend and go to Modules Click tab "New" and enter Module Class Name: "ProcessPageListMultipleSorting" Click "Download and Install"   Compatibility   I have currently tested the module only under PW 2.6+, but think that it works on older versions too. Maybe someone can give a feedback.     Download   PW-Repo: http://modules.processwire.com/modules/process-page-list-multiple-sorting/ GitHub: https://github.com/FlipZoomMedia/Processwire-ProcessPageListMultipleSorting     I hope someone can use the module. Have fun and best regards, David
    • By dimitrios
      Hello,
      this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
      To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
      Minimum Required Facebook App configuration:
      on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version (has been tested up to v3.3), add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "https://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is utilized.


×
×
  • Create New...