9. 問題の実装 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?php class BlackListDB { const DBPATH = "/tmp/db.gdbm"; public function isBlock($id) { $dbh = dba_open(self::DBPATH, "r", "gdbm"); if ($dbh === false) { return null; } $ret = dba_exists($id, $dbh); dba_close($dbh); return $ret; } } 10. 問題点 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?php class BlackListDB { const DBPATH = "/tmp/db.gdbm"; publ
![本当に怖いパフォーマンスが悪い実装 #phpcon2013](https://cdn-ak-scissors.b.st-hatena.com/image/square/9ae7bf5106e149567279a0d42fb5d7482bea9490/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fphpcon2013performance-130917050639-phpapp02-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)