Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6340161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:47:02+00:00 2026-05-24T19:47:02+00:00

Using Eclipse’s PHP Profiler, I have discovered a bottleneck in my code on a

  • 0

Using Eclipse’s PHP Profiler, I have discovered a bottleneck in my code on a method that is called many times. The problem is that I cannot tell what parameters were passed in to the method to determine how to reproduce the symptom.

I have tried surrounding the code that the profiler is reporting as taking a full second to complete with the following:

$startTime = microtime(true);
$safe_text = wp_check_invalid_utf8( $text );
$endTime = microtime(true);
$time = $endTime - $startTime;
if ($time > .05) {
    error_log('Time: ' . $time . ' text [' . $text . ']');
}

I never have a single hit in the error log for this, yet the profiler will continue to report one as taking a full second to complete. Refreshing the page in the browser does indicate that there is significant slowness.

I have this same problem in 3 different areas of my code and knowing what was being passed in to the methods at the time they run slowly may be of assistance in fixing the problem. Is there any way to determine what is being passed in to the intermittently slow method when it is running slowly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:47:03+00:00Added an answer on May 24, 2026 at 7:47 pm

    It is possible to set this up using xdebug which is what Eclipse uses for profiling, however it’s disabled by default because recording this data in a project that makes a lot of calls or passes large data structures would quickly overwhelm your available memory.

    I recommend you do manual logging as you are currently doing although I’d start by measuring the total time of all calls to wp_check_invalid_utf8 to make sure you do infact have a problem in just that part and that is isn’t just a problem caused by the Eclipse profiler itself. Once you’ve established the total time is more than you would like, then start logging individual calls and their parameters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Eclipse 3.4 and have configured the Java code formatter with all of
We're using eclipse and we have a main project with many different sub-projects/fascades/settings, etc.
Using Eclipse or IntelliJ how can you locate all code that may modify a
Using Eclipse I want to view the source code for a core Java class
When using Eclipse PDT with XDebug to debug a PHP web application, is there
I have been using Eclipse as an IDE for a short amount of time
Using Eclipse 3.6 and Groovy 2.0.1.20100319-1100-e35-RELEASE, auto-format does nothing. That is, for a given
Using Eclipse + PDT, I know that you can specify the return type of
I am using Eclipse v3.5. In previous Eclipse versions i remember if i have
hi i am using eclipse ide for c++ and i have file.a and i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.