SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
2011-02-10
(@tsatoppejp)
•    :


•twitter: tsatoppejp

•Facebook: tsatoppejp

•    : 2006             2010
The More with symfony book
                              ...


 ORM
          Propel   Doctrine
       PHP


 PHP5.3
Doctrine
                               ...

           5.2.5         PHP




              Doctrine


                   PHP
...

• PHP                             (PHP5.3       )


• Doctrine


•                  Doctrine   (             )
$a = new stdClass();
$a->self = $a;
//               $a refcount   2   1   a   (   )


unset($a);
// $a refcount    1
//                    $a                           (PHP5.3   )
Doctrine free()

$a = new stdClass();
$a->self = $a;

$a->self = null;
// unset()


unset($a);
// $a refcount   0
//                   $a

//                        Doctrine   free()
Doctrine

•                4682     Symfony1.4.3   task   sfDoctrinePager    100




•                         Doctrine::HYDRATE_ARRAY(     )


• PHP              PHP 5.2.14 PHP 5.3.5


• AWS EC2 small instance(32              1.7 GB 1          160GB     )
Doctrine

$pager = new sfDoctrinePager('User', 100);
$q = Doctrine_Query::create()->from('User u');
$pager->setPage(1);
$pager->setQuery($q);
$pager->init();

while ($pager->getResults()->count()) {
  foreach ($pager->getResults() as $user) {
      $user_id = $user->getId();
  // foreach ($pager->getResults(Doctrine::HYDRATE_ARRAY) as $user) {
      // $user_id = $user[‘id’];
  }

    $page = $pager->getPage();
    $page++;
    $pager->setPage($page);
    ...
}
Doctrine

40000000
                       PHP5.2.14 Object
                       PHP5.2.14 Object free()
                       PHP5.2.14 Array
                       PHP5.3.5 Object
                       PHP5.3.5 Object free()
                       PHP5.3.5 Array

30000000




20000000




10000000




      0
           100   300     500    700   900   1100   1300   1500   1700   1900   2100   2300   2500   2700   2900   3100   3300   3500   3700   3900   4100   4300   4500   4700
Doctrine


     PHP5.2.14 Object                                                   7.498278141




PHP5.2.14 Object free()                                                           8.2011160851




      PHP5.2.14 Array                                    6.247120142




      PHP5.3.5 Object                                                  7.4590570927




 PHP5.3.5 Object free()                                                 7.5311901569




       PHP5.3.5 Array                               5.9629459381




                          0   2.25   4.50                              6.75                      9.00
                                            (   )
• $user->free()




•                            Doctrine::HYDRATE_ARRAY(      )
                                                       Doctrine::HYDRATE_ARRAY
    (   )


• $user->free()   unset($user)   gc_collect_cycles()       Doctrine1
            PHP5.2 5.3
Doctrine2

$dql = "SELECT u FROM EntitiesUser u";
$query = $em->createQuery($dql);
$iterableResult = $query->iterate();
$i = 0;
foreach($iterableResult AS $row) { // PDOStatement::fetch()
    $user_id = $row[0]->getId();
   ...
    if ($i % 150 == 0) {
        $em->flush();
        $em->clear();
    }
    $i++;
}
Doctrine2

15000000
                       Doctrine2
                       Doctrine2 clear()




11250000




7500000




3750000




      0
           100   300    500    700   900   1100   1300   1500   1700   1900   2100   2300   2500   2700   2900   3100   3300   3500   3700   3900   4100   4300   4500   4700
Doctrine2


       Doctrine2                                                 2.8972089291




 Doctrine2 clear()        2.8944861889
                                                       0.003




                2.89300      2.89425     2.89550               2.89675          2.89800
                                              (    )
40000000
                  PHP5.2.14 Object
                  PHP5.2.14 Object free()
                  PHP5.2.14 Array
                  PHP5.3.5 Object
                  PHP5.3.5 Object free()
                  PHP5.3.5 Array
                  Doctrine2
                  Doctrine2 clear()
30000000




20000000




10000000




      0
           100   300   500   700   900   1100   1300   1500   1700   1900   2100   2300   2500   2700   2900   3100   3300   3500   3700   3900   4100   4300   4500   4700
PHP5.2.14 Object                                                          7.498278141



PHP5.2.14 Object free()                                                                 8.2011160851



      PHP5.2.14 Array                                           6.247120142



      PHP5.3.5 Object                                                         7.4590570927



 PHP5.3.5 Object free()                                                       7.5311901569



       PHP5.3.5 Array                                       5.9629459381



            Doctrine2         2.8972089291



      Doctrine2 clear()       2.8944861889




                          0     2.25         4.50                              6.75                    9.00
                                                    (   )
• Doctrine1       PHP5.3


• Doctrine1       select    free()


• Doctrine2       clear()                        (
              )


•                                    Doctrine2
Doctrine1

$pager = new sfDoctrinePager('User', 100);
$q = Doctrine_Query::create()->from('User u');
$pager->setPage(1);
$pager->setQuery($q);
$pager->init();

while ($pager->getResults()->count()) {
  foreach ($pager->getResults() as $user) {
    $command = sprintf(“/path/to/symfony execute:task %d”, $user->getId());
    `$command`; //

        $user->free();
    }

    $page = $pager->getPage();
    $page++;
    $pager->setPage($page);
    ...
}
Doctrineのメモリーリークについて

Mais conteúdo relacionado

Mais procurados

Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화
HyeonSeok Choi
 
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察
Tsuyoshi Yamamoto
 
Java programs
Java programsJava programs
Java programs
jojeph
 

Mais procurados (20)

Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화
 
The Ring programming language version 1.7 book - Part 25 of 196
The Ring programming language version 1.7 book - Part 25 of 196The Ring programming language version 1.7 book - Part 25 of 196
The Ring programming language version 1.7 book - Part 25 of 196
 
Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS Apps
 
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察
 
Ext oo
Ext ooExt oo
Ext oo
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
はじめてのGroovy
はじめてのGroovyはじめてのGroovy
はじめてのGroovy
 
The Origin of Lithium
The Origin of LithiumThe Origin of Lithium
The Origin of Lithium
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
Looping the Loop with SPL Iterators
Looping the Loop with SPL IteratorsLooping the Loop with SPL Iterators
Looping the Loop with SPL Iterators
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
dotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World ProtocolsdotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World Protocols
 
Mozilla とブラウザゲーム
Mozilla とブラウザゲームMozilla とブラウザゲーム
Mozilla とブラウザゲーム
 
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinAsync code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
 
Lithium Best
Lithium Best Lithium Best
Lithium Best
 
Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)
 
Java programs
Java programsJava programs
Java programs
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
The Ring programming language version 1.5.1 book - Part 44 of 180
The Ring programming language version 1.5.1 book - Part 44 of 180The Ring programming language version 1.5.1 book - Part 44 of 180
The Ring programming language version 1.5.1 book - Part 44 of 180
 
From Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf Milan
From Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf MilanFrom Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf Milan
From Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf Milan
 

Semelhante a Doctrineのメモリーリークについて

Pygrunn 2012 down the rabbit - profiling in python
Pygrunn 2012   down the rabbit - profiling in pythonPygrunn 2012   down the rabbit - profiling in python
Pygrunn 2012 down the rabbit - profiling in python
Remco Wendt
 
Advanced python
Advanced pythonAdvanced python
Advanced python
EU Edge
 
DjangoCon US 2011 - Monkeying around at New Relic
DjangoCon US 2011 - Monkeying around at New RelicDjangoCon US 2011 - Monkeying around at New Relic
DjangoCon US 2011 - Monkeying around at New Relic
Graham Dumpleton
 
Djangocon11: Monkeying around at New Relic
Djangocon11: Monkeying around at New RelicDjangocon11: Monkeying around at New Relic
Djangocon11: Monkeying around at New Relic
New Relic
 

Semelhante a Doctrineのメモリーリークについて (20)

Pygrunn 2012 down the rabbit - profiling in python
Pygrunn 2012   down the rabbit - profiling in pythonPygrunn 2012   down the rabbit - profiling in python
Pygrunn 2012 down the rabbit - profiling in python
 
Down the rabbit hole, profiling in Django
Down the rabbit hole, profiling in DjangoDown the rabbit hole, profiling in Django
Down the rabbit hole, profiling in Django
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)
 
Java Profiling Tools
Java Profiling ToolsJava Profiling Tools
Java Profiling Tools
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Twig tips and tricks
Twig tips and tricksTwig tips and tricks
Twig tips and tricks
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Welcome to python
Welcome to pythonWelcome to python
Welcome to python
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
 
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
 
Come on, PHP 5.4!
Come on, PHP 5.4!Come on, PHP 5.4!
Come on, PHP 5.4!
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)
 
Advanced python
Advanced pythonAdvanced python
Advanced python
 
New in php 7
New in php 7New in php 7
New in php 7
 
Python na Infraestrutura 
MySQL do Facebook

Python na Infraestrutura 
MySQL do Facebook
Python na Infraestrutura 
MySQL do Facebook

Python na Infraestrutura 
MySQL do Facebook

 
DjangoCon US 2011 - Monkeying around at New Relic
DjangoCon US 2011 - Monkeying around at New RelicDjangoCon US 2011 - Monkeying around at New Relic
DjangoCon US 2011 - Monkeying around at New Relic
 
Djangocon11: Monkeying around at New Relic
Djangocon11: Monkeying around at New RelicDjangocon11: Monkeying around at New Relic
Djangocon11: Monkeying around at New Relic
 
Advanced symfony Techniques
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony Techniques
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Doctrineのメモリーリークについて

  • 2. : •twitter: tsatoppejp •Facebook: tsatoppejp • : 2006 2010
  • 3.
  • 4. The More with symfony book ... ORM Propel Doctrine PHP PHP5.3
  • 5. Doctrine ... 5.2.5 PHP Doctrine PHP
  • 6. ... • PHP (PHP5.3 ) • Doctrine • Doctrine ( )
  • 7. $a = new stdClass(); $a->self = $a; // $a refcount 2 1 a ( ) unset($a); // $a refcount 1 // $a (PHP5.3 )
  • 8. Doctrine free() $a = new stdClass(); $a->self = $a; $a->self = null; // unset() unset($a); // $a refcount 0 // $a // Doctrine free()
  • 9. Doctrine • 4682 Symfony1.4.3 task sfDoctrinePager 100 • Doctrine::HYDRATE_ARRAY( ) • PHP PHP 5.2.14 PHP 5.3.5 • AWS EC2 small instance(32 1.7 GB 1 160GB )
  • 10. Doctrine $pager = new sfDoctrinePager('User', 100); $q = Doctrine_Query::create()->from('User u'); $pager->setPage(1); $pager->setQuery($q); $pager->init(); while ($pager->getResults()->count()) { foreach ($pager->getResults() as $user) { $user_id = $user->getId(); // foreach ($pager->getResults(Doctrine::HYDRATE_ARRAY) as $user) { // $user_id = $user[‘id’]; } $page = $pager->getPage(); $page++; $pager->setPage($page); ... }
  • 11. Doctrine 40000000 PHP5.2.14 Object PHP5.2.14 Object free() PHP5.2.14 Array PHP5.3.5 Object PHP5.3.5 Object free() PHP5.3.5 Array 30000000 20000000 10000000 0 100 300 500 700 900 1100 1300 1500 1700 1900 2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300 4500 4700
  • 12. Doctrine PHP5.2.14 Object 7.498278141 PHP5.2.14 Object free() 8.2011160851 PHP5.2.14 Array 6.247120142 PHP5.3.5 Object 7.4590570927 PHP5.3.5 Object free() 7.5311901569 PHP5.3.5 Array 5.9629459381 0 2.25 4.50 6.75 9.00 ( )
  • 13. • $user->free() • Doctrine::HYDRATE_ARRAY( ) Doctrine::HYDRATE_ARRAY ( ) • $user->free() unset($user) gc_collect_cycles() Doctrine1 PHP5.2 5.3
  • 14. Doctrine2 $dql = "SELECT u FROM EntitiesUser u"; $query = $em->createQuery($dql); $iterableResult = $query->iterate(); $i = 0; foreach($iterableResult AS $row) { // PDOStatement::fetch()     $user_id = $row[0]->getId();    ...     if ($i % 150 == 0) {         $em->flush();         $em->clear();     }     $i++; }
  • 15. Doctrine2 15000000 Doctrine2 Doctrine2 clear() 11250000 7500000 3750000 0 100 300 500 700 900 1100 1300 1500 1700 1900 2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300 4500 4700
  • 16. Doctrine2 Doctrine2 2.8972089291 Doctrine2 clear() 2.8944861889 0.003 2.89300 2.89425 2.89550 2.89675 2.89800 ( )
  • 17. 40000000 PHP5.2.14 Object PHP5.2.14 Object free() PHP5.2.14 Array PHP5.3.5 Object PHP5.3.5 Object free() PHP5.3.5 Array Doctrine2 Doctrine2 clear() 30000000 20000000 10000000 0 100 300 500 700 900 1100 1300 1500 1700 1900 2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300 4500 4700
  • 18. PHP5.2.14 Object 7.498278141 PHP5.2.14 Object free() 8.2011160851 PHP5.2.14 Array 6.247120142 PHP5.3.5 Object 7.4590570927 PHP5.3.5 Object free() 7.5311901569 PHP5.3.5 Array 5.9629459381 Doctrine2 2.8972089291 Doctrine2 clear() 2.8944861889 0 2.25 4.50 6.75 9.00 ( )
  • 19. • Doctrine1 PHP5.3 • Doctrine1 select free() • Doctrine2 clear() ( ) • Doctrine2
  • 20. Doctrine1 $pager = new sfDoctrinePager('User', 100); $q = Doctrine_Query::create()->from('User u'); $pager->setPage(1); $pager->setQuery($q); $pager->init(); while ($pager->getResults()->count()) { foreach ($pager->getResults() as $user) { $command = sprintf(“/path/to/symfony execute:task %d”, $user->getId()); `$command`; // $user->free(); } $page = $pager->getPage(); $page++; $pager->setPage($page); ... }