mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
- add some simple cache
- disable check of conf/searchengine/type - faster construction of concept-paths - pass strucure to es as factory (useless, to be reverted) - add stopwatch (log into file, disabled for now)
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\Structure;
|
||||
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\FieldMapping;
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Mapping;
|
||||
use Alchemy\Phrasea\Utilities\Stopwatch;
|
||||
use Assert\Assertion;
|
||||
use DomainException;
|
||||
|
||||
@@ -56,6 +57,7 @@ final class GlobalStructure implements Structure
|
||||
$fields = [];
|
||||
$flags = [];
|
||||
|
||||
$stopwatch = new Stopwatch("globalStructure");
|
||||
foreach ($databoxes as $databox) {
|
||||
if($what & self::STRUCTURE_WITH_FIELDS) {
|
||||
foreach ($databox->get_meta_structure() as $fieldStructure) {
|
||||
@@ -69,8 +71,12 @@ final class GlobalStructure implements Structure
|
||||
}
|
||||
}
|
||||
}
|
||||
$stopwatch->lap('loop0');
|
||||
$r = new self($fields, $flags, MetadataHelper::createTags());
|
||||
|
||||
return new self($fields, $flags, MetadataHelper::createTags());
|
||||
$stopwatch->log();
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user