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

  • SEARCH
  • Home
  • 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 8673035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:21:13+00:00 2026-06-12T19:21:13+00:00

I am going to work on a project developped by someone else. I don’t

  • 0

I am going to work on a project developped by someone else. I don’t have any contact with this guy.
I noticed a very high cpu consumption by the browser when the page is loaded.

After some investigations, i think that the problem comes from a patch of jquery regex but I don’t clearly understand the goal of this patch and the cause of this cpu consumption.

jQuery.expr[':'].regex = function(elem, index, match) {
   var matchParams = match[3].split(',');
   var validLabels = /^(data|css):/;
   var attr = {
      method:
         matchParams[0].match(validLabels) ? matchParams[0].split(':')[0] : 'attr',
         property: matchParams.shift().replace(validLabels,'')
   };
   var regexFlags = 'ig';
   var regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''), regexFlags);
   return regex.test(jQuery(elem)[attr.method](attr.property));
};

I have seen that this method was constanly called.

I have several calls to regex like this one.

$(':regex(id,DelCompo.*$)').livequery('click',function(e) {
   //...
}

If I comment them, the cpu consumption seems to be normal. Of course, some features are broken.

I think the problem comes from this new regex function. Is it correct?
What would be the best way to fix this problem?

Thanks

  • 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-06-12T19:21:14+00:00Added an answer on June 12, 2026 at 7:21 pm

    FYI, I fixed it by not using regex in the jquery selector. I guess that this was not the right choice for my document.

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

Sidebar

Related Questions

So I have this project with concurrent work going on in 2 releases, the
I am going to work on a project where a fairly large web app
I am going to work on a project that involves Paypal function. My question
Initially I thought this was going to work, but now I understand it won't
I have an application that is going to work like a p2p-software where all
hi i am a bit stuck with this. what i am going to work
At my current place of work we have a set way of going about
I am trying to get this to work but can't see where I'm going
I have a project going on, and I am in charge of the front-end
I found this little gem in our codebase at work recently. I have to

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.