bmidget/kohana-formo — Issue #147: Select Field with a few hundred Options is slow
Author: fo3-nik5
Created: 2011-10-20 09:14:05+00:00
State: open

Rendering a Form with a Select Field with a few hundred Options is slow.
It takes a few seconds.

Test used:

public function action_formooption()
{
$form = Formo::form('options');

$options = array();
for ($i = 0;$i < 900;$i++)
{
$options[] = array($i => $i);
}

$form->add_group('test', 'select', $options);

if (Kohana::$profiling === true)
{
// Start a new benchmark
$benchmark = Profiler::start('Formo', 'Options render Test');
}

echo $form->render();

if (isset($benchmark))
{
// Stop the benchmark
Profiler::stop($benchmark);
}

echo View::factory('profiler/stats');
}

Is there a way to speed this up?