Print info about module cache size

felipesanches-svg
Marius Kintel 2012-02-15 12:36:13 +01:00
parent 7b9b798fdc
commit 6845399e49
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@ class ModuleCache
public:
static ModuleCache *instance() { if (!inst) inst = new ModuleCache; return inst; }
class Module *evaluate(const std::string &filename);
size_t size() { return this->entries.size(); }
void clear();
private:

View File

@ -650,9 +650,6 @@ void MainWindow::compile(bool reload, bool procevents)
// Dump the tree (to initialize caches).
// FIXME: We shouldn't really need to do this explicitly..
this->tree.getString(*this->root_node);
PRINT("Compilation finished.");
if (procevents) QApplication::processEvents();
}
}
@ -1049,7 +1046,10 @@ void MainWindow::compileTopLevelDocument(bool reload)
}
}
if (this->root_module) this->root_module->handleDependencies();
if (this->root_module) {
this->root_module->handleDependencies();
PRINTB("Module cache size: %d modules", ModuleCache::instance()->size());
}
}
void MainWindow::checkAutoReload()