Падает сайт при получении большого списка данных битрикс

При получении большого списка данных сайт может падать при их обработке, например если пользователей 20 000 а нужно получить их всех и отфильтровать, сайт может падать, что же делать?
$rsUsers = CUser::GetList(($by=»id»), ($order=»asc»), $filter=array()); // выбираем пользователей
while ($arUser = $rsUsers->Fetch())
{

Можно разбить записи постранично и все будет ок, для этого добавьте этот когд

$is_filtered = $rsUsers->is_filtered; // отфильтрована ли выборка
$rsUsers->NavStart(50);

Вот что получилось, при таком раскладе мы получим все записи и нормально отфильтруем

$rsUsers = CUser::GetList(($by=»id»), ($order=»asc»), $filter=array()); // выбираем пользователей
$is_filtered = $rsUsers->is_filtered; // отфильтрована ли выборка
$rsUsers->NavStart(50);
while ($arUser = $rsUsers->Fetch())
{

Падает сайт при получении большого списка данных битрикс

5 мыслей о “Падает сайт при получении большого списка данных битрикс

  • 10.03.2024 в 03:51
    Permalink

    Wow, awesome blog format! How lengthy have you ever been running a blog for?

    you make running a blog look easy. The overall look of
    your website is excellent, as neatly as the content
    material! You can see similar here dobry sklep

  • 13.03.2024 в 01:22
    Permalink

    Great weblog here! Additionally your web site loads up very fast!

    What web host are you the usage of? Can I get your associate hyperlink on your host?
    I want my site loaded up as quickly as yours lol I saw similar here:
    Dobry sklep

  • 14.03.2024 в 20:48
    Permalink

    Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said «You can hear the ocean if you put this to your ear.» She placed
    the shell to her ear and screamed. There was a hermit
    crab inside and it pinched her ear. She never wants to go back!

    LoL I know this is totally off topic but I had to tell someone!

    I saw similar here: Ecommerce

  • 22.03.2024 в 08:21
    Permalink

    Everyone loves what you guys tend to be up too. Such clever work and exposure!
    Keep up the wonderful works guys I’ve incorporated you
    guys to my own blogroll. I saw similar here:
    Ecommerce

  • 28.03.2024 в 22:06
    Permalink

    Hello! Do you know if they make any plugins to help with Search Engine Optimization?
    I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good results. If you know of any please share.
    Thank you! You can read similar article here: Sklep internetowy

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *