Advertisement:

Author Topic: a very strange question  (Read 408 times)

Offline billrune

  • Semi-Newbie
  • *
  • Posts: 32
a very strange question
« on: September 12, 2019, 11:47:18 AM »
at MessageIndex.php
under function MessageIndex   after loadTemplate('MessageIndex');
i just add this to make a test

   $context['topics'][58] = '44';
   return;

after it add a lot of queries. 46 queries.
if only add return;  then only 15 queries.

anyone know what's the problem?  it's only define a data.

thank you very much.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,312
  • Gender: Male
    • Kindred-999 on GitHub
Re: a very strange question
« Reply #1 on: September 12, 2019, 12:02:03 PM »
you are adding something to the context array... the contyext array is huge and contains a whole ton of data drawn from a variety of places (depending on the page)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,666
    • StoryBB/StoryBB on GitHub
Re: a very strange question
« Reply #2 on: September 12, 2019, 01:21:50 PM »
More importantly, your installation sounds like it’s messed up because that number of queries doesn’t happen on an unmodified 2.0.

I really wouldn’t just randomly change things, it has a huge propensity to break your site in other ways.
Please don’t PM me for paid work, I’m not for hire, and even if I was, I doubt you could afford me.
USD$150 per hour. Typical waiting list 3 months.