简体   繁体   中英

Compiling doctrine as a extension to php

Heard that doctrine makes php code slow which is understandable. Found people suggesting to use opcode caching to improve it a bit. Cant we take it a bit further and make it a part of php?

Is doctrine common http://www.doctrine-project.org/projects/common extend only class loading and adds annotation support ? Why not do the entire doctrine as an extension of php something like GD?

That would mean rewriting Doctrine in C, so it can be loaded as an extension in the first place. This is no small feat due to the size and complexity of Doctrine.

If I recall correctly, the devs did discuss this at some time, at least I remember seeing some talk about it on #doctrine-dev ages ago. My guess is that it was decided against for a number of reasons. That being said, Doctrine actually scales quite well, and it's not that slow contrary to some beliefs. Especially with Doctrine 2.0, which improves the performance by loads, due to having much more lightweight entities and different design approach that fixes many of the issues D1 had.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM