форум vBSupport.ru > vBulletin > Вопрос — Ответ
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
diim
Знаток
 
diim's Avatar
Default Подскажите решение долгая загрузка memberlist.php
0

Подскажите решение , пользователей на форуме порядка 800к, заметил такую штуку при открытие страницы пользователи /memberlist.php страница открывается с задержкой по 30 сек, тем самым создается не плохая нагрузочка для одного запроса данной страницы. Какие у кого идеи оптимизации ? Перерыл весь форум, ничего подобного не нашел. Так же подобная ситуация происходит со страницей руководство форума /showgroups.php?

Идеи удали неактивных не принимаются
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Север
Специалист
vBSponsor
 
Север's Avatar
Default
0

@diim, придется показывать ресурс. Гадать на кофейной гуще, никто не будет.
Как вариант, включена колонка "Система мгновенных сообщений", а в админке стоит "Использовать графику SkypeWeb - Да".
 
 
Kurbatov
Эксперт
vBSponsor
 
Kurbatov's Avatar
Default
0

А еще может быть большой список пользователей на странице, и аватарки в базе данных хранятся.
 
 
OldEr
Специалист
Master
 
OldEr's Avatar
Default
0

@diim, какое количество пользователей выводится на странице?
 
 
diim
Знаток
 
diim's Avatar
Default
0

Quote:
Originally Posted by Север View Post
Использовать графику SkypeWeb - Да
графика отключена

Quote:
Originally Posted by Север View Post
придется показывать ресурс
Ресурс nowa.cc

Quote:
Originally Posted by Север View Post
Как вариант, включена колонка "Система мгновенных сообщений"


Quote:
Originally Posted by Kurbatov View Post
аватарки в базе данных хранятся
В файлах

Quote:
Originally Posted by OldEr View Post
@diim, какое количество пользователей выводится на странице?
30 пользователей

Вот ссылка на страницу http://nowa.cc/memberlist.php
Время генерации страницы 31.84017 секунды с 11 запросами [Загрузка сервера: 0.95 : 0.38 : 0.26]

Last edited by diim : 04-09-2017 at 11:54 PM.
 
 
kerk
k0t
 
kerk's Avatar
Default
0

Quote:
Originally Posted by diim View Post
Время генерации страницы 31.84017 секунды с...
там кнопачка есть [?] в дебаг панельке (внизу которая) на нее нажать и на след странице, посмотреть внимательно, где именно тормозит скрипт
 
 
diim
Знаток
 
diim's Avatar
Default
0

Quote:
Originally Posted by kerk View Post
там кнопачка есть [?] в дебаг панельке (внизу которая) на нее нажать и на след странице, посмотреть внимательно, где именно тормозит скрипт
http://nowa.cc/memberlist.php?explain=1
Code:
End call of global.php: 0.066503047943115 
SQL Query
SELECT profilefieldid, type, data, optional, memberlist, searchable
FROM profilefield
WHERE form = 0 
ORDER BY displayorderid	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	profilefield	ALL	 	 	 	 	6	Using where; Using filesort


Time Before: 0.09822 seconds
Time After: 0.09847 seconds
Time Taken: 0.00026 seconds

Memory Before: 10,435.547 KB
Memory After: 10,435.953 KB
Memory Used: 0.406 KB
SQL Query
SELECT COUNT(*) AS users
FROM user AS user


WHERE 1=1
	AND (user.usergroupid IN (-1,9,6,2,10,5,7,12,3,13))id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	user	range	usergroupid	usergroupid	2	 	458924	Using where; Using index


Time Before: 0.09992 seconds
Time After: 0.47471 seconds
Time Taken: 0.37479 seconds

Memory Before: 10,460.852 KB
Memory After: 10,461.297 KB
Memory Used: 0.445 KB
SQL Query
SELECT user.*,usertextfield.*,userfield.*, user.userid, options,
	IF(user.displaygroupid=0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid
,IF((NOT(options & 1024) AND (user.usergroupid IN (-1,9,6,10,5,7,13) OR FIND_IN_SET('9', membergroupids) OR FIND_IN_SET('6', membergroupids) OR FIND_IN_SET('10', membergroupids) OR FIND_IN_SET('5', membergroupids) OR FIND_IN_SET('7', membergroupids) OR FIND_IN_SET('13', membergroupids))), 0, reputation) AS reputationscore
,avatar.avatarpath,NOT ISNULL(customavatar.userid) AS hascustomavatar,customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight
, pp_profilepic.requirement AS profilepicrequirement, customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight
 , lastactivity AS lastvisittime 



FROM user AS user
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
LEFT JOIN userfield AS userfield ON(userfield.userid=user.userid)
LEFT JOIN reputationlevel AS reputationlevel ON(user.reputationlevelid=reputationlevel.reputationlevelid) 
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)

	LEFT JOIN customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
	LEFT JOIN profileblockprivacy AS pp_profilepic ON
		(pp_profilepic.userid = user.userid AND pp_profilepic.blockid = 'profile_picture')


WHERE 1=1
	AND (user.usergroupid IN (-1,9,6,2,10,5,7,12,3,13))
	
ORDER BY user.username asc 
LIMIT 0, 30id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	user	ALL	usergroupid	 	 	 	800581	Using where; Using temporary; Using filesort
1	SIMPLE	usertextfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	userfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	reputationlevel	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.reputationlevelid	1	Using index
1	SIMPLE	avatar	ALL	PRIMARY	 	 	 	1	Using where; Using join buffer (Block Nested Loop)
1	SIMPLE	customavatar	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	customprofilepic	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	pp_profilepic	eq_ref	PRIMARY	PRIMARY	771	nowa_utf8.user.userid,const	1	Using where


Time Before: 0.48152 seconds
Time After: 31.85765 seconds
Time Taken: 31.37613 seconds

Memory Before: 10,479.242 KB
Memory After: 10,478.133 KB
Memory Used: -1.109 KB
SQL Query
UPDATE session
SET lastactivity = 1491808550, location = '/memberlist.php?explain=1', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = '925a669bf765806c950ffd30edbe8a1b'

Time Before: 32.01261 seconds
Time After: 32.01312 seconds
Time Taken: 0.00050 seconds

Memory Before: 10,886.609 KB
Memory After: 10,886.805 KB
Memory Used: 0.195 KB
SQL Query
UPDATE user
SET lastactivity = 1491808550
WHERE userid = 679

Time Before: 32.01319 seconds
Time After: 32.48726 seconds
Time Taken: 0.47407 seconds

Memory Before: 10,881.180 KB
Memory After: 10,881.508 KB
Memory Used: 0.328 KB
Page generated in 32.00895 seconds with 13 queries, spending 32.22637462616 doing MySQL queries and -0.21742462615967 doing PHP things. 
Shutdown Queries: DISABLED
http://nowa.cc/showgroups.php?&explain=1
Code:
End call of global.php: 0.063669919967651 
SQL Query
SELECT profilefieldid
FROM profilefield
WHERE profilefieldid = 2id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	profilefield	const	PRIMARY	PRIMARY	2	const	1	Using index


Time Before: 0.06487 seconds
Time After: 0.06500 seconds
Time Taken: 0.00014 seconds

Memory Before: 9,168.266 KB
Memory After: 9,168.766 KB
Memory Used: 0.500 KB
SQL Query
SELECT user.*,
	usergroup.usergroupid, usergroup.title,
	user.options, usertextfield.buddylist,
	userfield.field2,
	IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
FROM user AS user
LEFT JOIN usergroup AS usergroup ON(usergroup.usergroupid = user.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
WHERE (usergroup.genericoptions & 1)id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	user	ALL	usergroupid	 	 	 	800581	 
1	SIMPLE	userfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	usertextfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.user.userid	1	 
1	SIMPLE	usergroup	ALL	PRIMARY	 	 	 	12	Using where; Using join buffer (Block Nested Loop)


Time Before: 0.08723 seconds
Time After: 14.24994 seconds
Time Taken: 14.16271 seconds

Memory Before: 9,373.734 KB
Memory After: 9,373.773 KB
Memory Used: 0.039 KB
SQL Query
SELECT user.*,
	moderator.forumid,
	usertextfield.buddylist,
	userfield.field2,
	IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
FROM moderator AS moderator
INNER JOIN user AS user USING(userid)
INNER JOIN userfield AS userfield ON(userfield.userid = user.userid)
INNER JOIN usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
WHERE moderator.forumid <> -1id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	moderator	index	userid_forumid,userid	userid_forumid	6	 	157	Using where; Using index
1	SIMPLE	user	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.moderator.userid	1	 
1	SIMPLE	usertextfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.moderator.userid	1	 
1	SIMPLE	userfield	eq_ref	PRIMARY	PRIMARY	4	nowa_utf8.moderator.userid	1	 


Time Before: 14.25695 seconds
Time After: 14.25935 seconds
Time Taken: 0.00240 seconds

Memory Before: 9,602.086 KB
Memory After: 9,602.203 KB
Memory Used: 0.117 KB
SQL Query
SELECT template
FROM template
WHERE templateid = 26830id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	template	const	PRIMARY	PRIMARY	4	const	1	 


Time Before: 14.29707 seconds
Time After: 14.29721 seconds
Time Taken: 0.00014 seconds

Memory Before: 10,704.109 KB
Memory After: 10,704.609 KB
Memory Used: 0.500 KB
SQL Query
UPDATE session
SET lastactivity = 1491809611, location = '/showgroups.php?&explain=1', loggedin = 2, inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = '702a8a60c51187266fd58c34159d863b'

Time Before: 14.30398 seconds
Time After: 14.30435 seconds
Time Taken: 0.00037 seconds

Memory Before: 11,104.773 KB
Memory After: 11,104.953 KB
Memory Used: 0.180 KB
SQL Query
UPDATE user
SET lastactivity = 1491809611
WHERE userid = 679

Time Before: 14.30443 seconds
Time After: 14.30488 seconds
Time Taken: 0.00046 seconds

Memory Before: 11,099.008 KB
Memory After: 11,099.336 KB
Memory Used: 0.328 KB
Page generated in 14.29977 seconds with 14 queries, spending 14.166921377182 doing MySQL queries and 0.13284862281799 doing PHP things. 
Shutdown Queries: DISABLED
Куда копать и ковырять ?

Last edited by diim : 04-10-2017 at 11:35 AM.
 
 
kerk
k0t
 
kerk's Avatar
Default
0

в первом куске кода
Code:
Time Before: 0.48152 seconds - время перед выполнением запроса
Time After: 31.85765 seconds - время после выполнения (!)
Time Taken: 31.37613 seconds
в запросе
Code:
AND (user.usergroupid IN (-1,9,6,2,10,5,7,12,3,13))
группа 3 - ожидающие подтверждения email
в мемберлист она зачем?
тем более, если там дохренища мертвых душ скопилось
====
во втором куске кода
Code:
Time Before: 0.08723 seconds - время перед выполнением запроса
Time After: 14.24994 seconds - время после выполнения (!)
Time Taken: 14.16271 seconds
то же самое...
 
 
diim
Знаток
 
diim's Avatar
Default
0

Quote:
Originally Posted by kerk View Post
тем более, если там дохренища мертвых душ скопилось
Уже все подчистил, всего 2000 человек в группе не подтвержденых, даже если их подчищу, куда остальных 800000 девать, тоже грохнуть это не вариант ?

kerk, где копать, что удалить , твое мнение ?
 
 
AleX
Гость
Default

@diim, в управление группами по данной группе функция "Отображать в списке пользователей" отключена?
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 10:46 PM.


Powered by vBulletin® Version 3.0.9
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.