Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13964040
D7584.id17120.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
D7584.id17120.diff
View Options
Index: src/symbols/PhutilSymbolLoader.php
===================================================================
--- src/symbols/PhutilSymbolLoader.php
+++ src/symbols/PhutilSymbolLoader.php
@@ -169,6 +169,13 @@
);
}
+ $names = null;
+ if ($this->base) {
+ $names = $this->selectDescendantsOf(
+ $bootloader->getClassTree(),
+ $this->base);
+ }
+
$symbols = array();
foreach ($libraries as $library) {
$map = $bootloader->getLibraryMap($library);
@@ -198,6 +205,13 @@
} else {
$filtered_map = array();
}
+ } else if ($names !== null) {
+ $filtered_map = array();
+ foreach ($names as $name => $ignored) {
+ if (isset($lookup_map[$name])) {
+ $filtered_map[$name] = $lookup_map[$name];
+ }
+ }
} else {
// Otherwise, start with everything.
$filtered_map = $lookup_map;
@@ -223,22 +237,6 @@
}
}
- if ($this->base) {
- $names = $this->selectDescendantsOf(
- $bootloader->getClassTree(),
- $this->base);
-
- foreach ($symbols as $symbol_key => $symbol) {
- $type = $symbol['type'];
- if ($type == 'class' || $type == 'interface') {
- if (isset($names[$symbol['name']])) {
- continue;
- }
- }
- unset($symbols[$symbol_key]);
- }
- }
-
if (!$this->suppressLoad) {
$caught = null;
foreach ($symbols as $symbol) {
@@ -320,6 +318,7 @@
return $objects;
}
+
/* -( Internals )---------------------------------------------------------- */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 16 2024, 7:24 PM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718806
Default Alt Text
D7584.id17120.diff (1 KB)
Attached To
Mode
D7584: Improve performacne of PhutilSymbolLoader
Attached
Detach File
Event Timeline
Log In to Comment