#5797: validation consume memory
-------------------------------+--------------------------------------------
    Reporter:  francky06l      |          Type:  Bug       
      Status:  new             |      Priority:  Medium    
   Milestone:  1.2.x.x         |     Component:  Validation
     Version:  RC3             |      Severity:  Normal    
    Keywords:                  |   Php_version:  n/a       
Cake_version:  1.2.0.7692 RC3  |  
-------------------------------+--------------------------------------------
 I am using validation in a shell with a large number of records update (up
 to 3-4 millions) and the validations are exhausting all the memory.
 The problem comes from the _check function in validation.php, this
 function set $_this->error[] to true/false but actually $_this->error is
 never reset, so the validation object keeps growing.
 $_this->error is actually not used (as far as I know), the same problem
 can occur with the the class variable $errors (never reset).

 I can't make a test case (since you can't estimate any memory usage),
 basically to reproduce, run $model->validates in a loop and watch the
 memory. If you reset $_this->error = array() of the Validation class prior
 to call validates everything is fine.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5797>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to