在php項目開發中,很多架構都是:smarty + adodb來做的,因為smarty功能強大,超過了任何模板處理類,特別是緩存技術。adodb功能強大,遠遠超過了pear::db處理類,所以大部分人都選擇adodb做數據庫抽象類,但是adodb類庫非常龐大,運行速度非常慢,這樣也是部分開發人員選擇pear db的原因。
但是,現在為止,這個現象要改變了,因為出來了一個adodb的小型版: adodb lite
據官方網站介紹說:
支持了所有php能支持的流行數據庫.而且據說比原來的老版本快了很多.
只需要完整版的1/6內存,完全兼容adodb,據官方說法,可以完全不要改動代碼的情況下移植到adodb lite下。
看官方網站的說法:
adodb lite was a result of a need for a very small, fast adodb library for a browser based game we have been working on for over two years called alien assault traders.
we noticed that the adodb package was consuming over 640k of ram for each http access. this was even greater than the amount used by the biggest php program file used in the game. in effect the adodb library was consuming vastly more resources than the game itself. this greatly restricts the number of players that can be online at the same time in respect to the amount of memory required by each client.
currently, adodb lite uses 80-85k of system ram for each http access. this is about an 87% smaller memory footprint. a side benefit is an increase in speed. the speed increase will vary depending upon the database. this is also a great replacement for extremely high traffic web sites.
we decided to create an ado database library that was compatible with adodb and used far less memory when executed. this library has a very restricted command set and eliminates most of the esoteric commands that will not be used by most websites.
adodb lite is a drop in replacement for adodb as long as you are not using unsupported commands on your website.
the following databases are supported:
databasetype designator (database name)
fbsq (frontbase)
maxdb (max db)
msql (mini sql)
mssql (microsoft sql)
mysql (mysql)
mysqli (mysql improved)
mysqlt (mysql w/transactions)
postgres (postgres)
postgres64 (postgres 6.4)
postgres7 (postgres 7)
sqlite (sqlite)
sybase (sybase)
the only databases that have been fully tested are the mysql databases. drivers have been provided for the other databases and they should work. i would appreciate it if users would report how well the other database drivers function.
簡直是。。。呵呵,我想是許多php開發者的喜歡,因為解決了速度問題。
adodb lite 目前最新版本是:0.0.6
新聞熱點
疑難解答