summaryrefslogtreecommitdiff
path: root/poc/poc02-compiling-cake/src/php-weave/main2.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2012-08-03 11:40:43 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2012-08-03 11:40:43 +0000
commit4c1215ca04bc682a5165363724a69f9a557304de (patch)
tree5f0402f4f7b07e5a34ad692bcb47828b30c9fa11 /poc/poc02-compiling-cake/src/php-weave/main2.php
parent688d58f51120786b099509ea3785a8057ae36265 (diff)
download2012-php-weave-4c1215ca04bc682a5165363724a69f9a557304de.tar.gz
2012-php-weave-4c1215ca04bc682a5165363724a69f9a557304de.tar.bz2
2012-php-weave-4c1215ca04bc682a5165363724a69f9a557304de.zip
Etape 2 sur 6743542 : parsing et tentative de mise en cache des AST des ficheir de tout le framework.
Avec dumpAST : 4m37 d'exec. Avec serializeAST : 3m30 mais tous les fichiers sont vides car json_encode n'encode pas les objets !!! git-svn-id: file:///var/svn/2012-php-weave/trunk@11 d972a294-176a-4cf9-8ea1-fcd5b0c30f5c
Diffstat (limited to 'poc/poc02-compiling-cake/src/php-weave/main2.php')
-rw-r--r--poc/poc02-compiling-cake/src/php-weave/main2.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/poc/poc02-compiling-cake/src/php-weave/main2.php b/poc/poc02-compiling-cake/src/php-weave/main2.php
new file mode 100644
index 0000000..faf3ac1
--- /dev/null
+++ b/poc/poc02-compiling-cake/src/php-weave/main2.php
@@ -0,0 +1,17 @@
+<?php
+require_once './cakephp_weaver.class.php';
+
+ini_set('xdebug.max_nesting_level', 2000);
+
+// Main
+$weaver=new CakePHPWeaver;
+$filelist = $weaver->findAllFiles("../workdir/cache", '/\.ast$/', '/^$/');
+$asts=array();
+foreach ($filelist as $f) {
+ echo "Unserializing '$f'\n";
+ $asts[]=$weaver->unserializeAST($f);
+}
+
+echo memory_get_usage();
+
+?>