Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15402227
D13323.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13323.diff
View Options
diff --git a/src/moduleutils/PhutilBootloader.php b/src/moduleutils/PhutilBootloader.php
--- a/src/moduleutils/PhutilBootloader.php
+++ b/src/moduleutils/PhutilBootloader.php
@@ -12,6 +12,7 @@
private $registeredLibraries = array();
private $libraryMaps = array();
private $extensionMaps = array();
+ private $extendedMaps = array();
private $currentLibrary = null;
private $classTree = array();
private $inMemoryMaps = array();
@@ -114,6 +115,10 @@
}
public function getLibraryMap($name) {
+ if (isset($this->extendedMaps[$name])) {
+ return $this->extendedMaps[$name];
+ }
+
if (empty($this->libraryMaps[$name])) {
$root = $this->getLibraryRoot($name);
$this->currentLibrary = $name;
@@ -167,6 +172,8 @@
}
}
+ $this->extendedMaps[$name] = $map;
+
return $map;
}
@@ -275,6 +282,10 @@
$this->extensionMaps[$library]['xmap'][$class] = $xmap;
}
}
+
+ // Clear the extended library cache (should one exist) so we know that
+ // we need to rebuild it.
+ unset($this->extendedMaps[$library]);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 9:27 PM (2 d, 29 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7409011
Default Alt Text
D13323.diff (1 KB)
Attached To
Mode
D13323: Make loading library maps much cheaper
Attached
Detach File
Event Timeline
Log In to Comment