Skip to content

Commit

Permalink
chore: filter out type:*
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Aug 2, 2023
1 parent 307c0e3 commit d32a7c3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/collections/componentSetBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ export class ComponentSetBuilder {
// The registry will throw if it doesn't know what this type is.
registry.getTypeByName(splitEntry[0]);

// if there's a better way to detect
if (splitEntry[1]?.includes('*')) {
if (splitEntry[1]?.includes('*') && splitEntry[1]?.length > 1) {
// get all components of the type, and then filter by the regex of the fullName
ComponentSet.fromSource({
fsPaths: directoryPaths,
include: new ComponentSet([{ type: splitEntry[0], fullName: ComponentSet.WILDCARD }]),
})
.getSourceComponents()
.toArray()
.filter((cs) => Boolean(cs.fullName.match(new RegExp(splitEntry[1].replace('*', '.*')))))
.map((match) => {
Expand Down

2 comments on commit d32a7c3

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: d32a7c3 Previous: 307c0e3 Ratio
eda-componentSetCreate-linux 290 ms 227 ms 1.28
eda-sourceToMdapi-linux 7721 ms 6361 ms 1.21
eda-sourceToZip-linux 5575 ms 4631 ms 1.20
eda-mdapiToSource-linux 5214 ms 4365 ms 1.19
lotsOfClasses-componentSetCreate-linux 588 ms 485 ms 1.21
lotsOfClasses-sourceToMdapi-linux 10275 ms 9266 ms 1.11
lotsOfClasses-sourceToZip-linux 9052 ms 7273 ms 1.24
lotsOfClasses-mdapiToSource-linux 5667 ms 4654 ms 1.22
lotsOfClassesOneDir-componentSetCreate-linux 946 ms 793 ms 1.19
lotsOfClassesOneDir-sourceToMdapi-linux 20170 ms 12334 ms 1.64
lotsOfClassesOneDir-sourceToZip-linux 14474 ms 12355 ms 1.17
lotsOfClassesOneDir-mdapiToSource-linux 10047 ms 8572 ms 1.17

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: d32a7c3 Previous: 307c0e3 Ratio
eda-componentSetCreate-win32 561 ms 406 ms 1.38
eda-sourceToMdapi-win32 7474 ms 8868 ms 0.84
eda-sourceToZip-win32 6022 ms 6088 ms 0.99
eda-mdapiToSource-win32 7759 ms 7879 ms 0.98
lotsOfClasses-componentSetCreate-win32 948 ms 876 ms 1.08
lotsOfClasses-sourceToMdapi-win32 11271 ms 10691 ms 1.05
lotsOfClasses-sourceToZip-win32 11686 ms 8764 ms 1.33
lotsOfClasses-mdapiToSource-win32 9493 ms 8708 ms 1.09
lotsOfClassesOneDir-componentSetCreate-win32 1609 ms 1581 ms 1.02
lotsOfClassesOneDir-sourceToMdapi-win32 18747 ms 19257 ms 0.97
lotsOfClassesOneDir-sourceToZip-win32 15723 ms 15073 ms 1.04
lotsOfClassesOneDir-mdapiToSource-win32 16727 ms 16338 ms 1.02

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.