bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

find() is slow #1183

Closed olaulau closed 4 years ago

olaulau commented 4 years ago

hi ; when I just fetch 1000 objects from a table using the find() method, it is a little slow I think, about 100ms. getting the same data as array with $db->exec("SELECT * FROM table LIMIT 1000") is really fast (3ms). I know the framework has to map every fields into the objects, but is there a way to speed it up a little bit ?

KOTRET commented 4 years ago

Do not use objects when fetching from database, use arrays instead. Please use Google Groups for questions.

olaulau commented 4 years ago

you mean we shouldn't use the F3's ORM ??