Skip to content

Commit 5f63abb

Browse files
authored
Add info about max core settings and why LO can be slow (#11888)
* Add info about settings. * Link to explanation of why LB is slow
1 parent 3a502fb commit 5f63abb

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

config/i18n.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
"ProcessingSets": "Finding highest stat sets...",
713713
"SaveAs": "Save as",
714714
"SetBonus": "Set Bonuses",
715-
"SpeedReport": "Evaluated {{combos, number}} combinations in {{time}} seconds using {{cpus}} CPU cores.",
715+
"SpeedReport": "Evaluated {{combos, number}} combinations in {{time}} seconds using {{cpus}} CPU cores. Adjust max cores in Settings.",
716716
"StatConstraints": "Stat Priorities & Ranges",
717717
"StatMax": "Max",
718718
"StatMin": "Min",
@@ -724,7 +724,8 @@
724724
"UnlockItem": "Unpin Item",
725725
"IncreaseStatPriority": "Increase stat priority",
726726
"DecreaseStatPriority": "Decrease stat priority",
727-
"IgnoreStat": "If unchecked, Loadout Optimizer will pretend this stat doesn't exist when building sets"
727+
"IgnoreStat": "If unchecked, Loadout Optimizer will pretend this stat doesn't exist when building sets",
728+
"WhySlow": "Why is this slow?"
728729
},
729730
"Loadouts": {
730731
"Abilities": "Abilities",

src/app/loadout-builder/LoadoutBuilder.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { D2ManifestDefinitions } from 'app/destiny2/d2-definitions';
77
import { savedLoStatConstraintsByClassSelector } from 'app/dim-api/selectors';
88
import CharacterSelect from 'app/dim-ui/CharacterSelect';
99
import CollapsibleTitle from 'app/dim-ui/CollapsibleTitle';
10+
import ExternalLink from 'app/dim-ui/ExternalLink';
1011
import PageWithMenu from 'app/dim-ui/PageWithMenu';
1112
import UserGuideLink from 'app/dim-ui/UserGuideLink';
1213
import { t } from 'app/i18next-t';
@@ -30,6 +31,7 @@ import { useD2Definitions } from 'app/manifest/selectors';
3031
import { searchFilterSelector } from 'app/search/items/item-search-filter';
3132
import { useSetSetting } from 'app/settings/hooks';
3233
import { AppIcon, disabledIcon, redoIcon, refreshIcon, undoIcon } from 'app/shell/icons';
34+
import { userGuideUrl } from 'app/shell/links';
3335
import { querySelector, useIsPhonePortrait } from 'app/shell/selectors';
3436
import { filterMap } from 'app/utils/collections';
3537
import { emptyArray, emptyObject } from 'app/utils/empty';
@@ -460,6 +462,12 @@ export default memo(function LoadoutBuilder({
460462
const remainingCombos = (totalCombos || 1) - completedCombos;
461463
const eta = remainingCombos / speed;
462464

465+
const whySlow = (
466+
<ExternalLink href={userGuideUrl('Why-Loadout-Optimizer-is-slow-or-uses-a-lot-of-CPU')}>
467+
{t('LoadoutBuilder.WhySlow')}
468+
</ExternalLink>
469+
);
470+
463471
return (
464472
<PageWithMenu className={styles.page}>
465473
<PageWithMenu.Menu className={clsx(styles.menuContent, styles.wide)}>
@@ -501,6 +509,7 @@ export default memo(function LoadoutBuilder({
501509
)}
502510
</span>
503511
)}
512+
{whySlow}
504513
</div>
505514
</span>
506515
) : (
@@ -511,6 +520,7 @@ export default memo(function LoadoutBuilder({
511520
time: (result.processTime / 1000).toFixed(2),
512521
cpus: getMaxParallelCores(),
513522
})}
523+
{whySlow}
514524
</span>
515525
)
516526
)}

src/app/loadout/loadout-ui/menu-hooks.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { LoadoutSort } from '@destinyitemmanager/dim-api-types';
22
import { bungieBackgroundStyleAdvanced } from 'app/dim-ui/BungieImage';
3+
import ExternalLink from 'app/dim-ui/ExternalLink';
34
import FilterPills, { Option } from 'app/dim-ui/FilterPills';
45
import ColorDestinySymbols from 'app/dim-ui/destiny-symbols/ColorDestinySymbols';
56
import { DimLanguage } from 'app/i18n';
@@ -16,6 +17,7 @@ import { DEFAULT_ORNAMENTS } from 'app/search/d2-known-values';
1617
import { ItemFilter } from 'app/search/filter-types';
1718
import { faCheckCircle, refreshIcon } from 'app/shell/icons';
1819
import AppIcon from 'app/shell/icons/AppIcon';
20+
import { userGuideUrl } from 'app/shell/links';
1921
import { isEmpty } from 'app/utils/collections';
2022
import { compareBy } from 'app/utils/comparators';
2123
import { emptyArray } from 'app/utils/empty';
@@ -257,6 +259,10 @@ function AnalysisProgress({
257259
{t('LoadoutAnalysis.Analyzed', { numLoadouts })}
258260
</>
259261
)}
262+
{' - '}
263+
<ExternalLink href={userGuideUrl('Why-Loadout-Optimizer-is-slow-or-uses-a-lot-of-CPU')}>
264+
{t('LoadoutBuilder.WhySlow')}
265+
</ExternalLink>
260266
</div>
261267
);
262268
}

src/locale/en.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@
752752
"SaveAs": "Save as",
753753
"SetBonus": "Set Bonuses",
754754
"SetBonusModWarning": "This set contains an item with a configurable set bonus mod. Manually apply the correct mod to activate the desired set bonus.",
755-
"SpeedReport": "Evaluated {{combos, number}} combinations in {{time}} seconds using {{cpus}} CPU cores.",
755+
"SpeedReport": "Evaluated {{combos, number}} combinations in {{time}} seconds using {{cpus}} CPU cores. Adjust max cores in Settings.",
756756
"StatConstraints": "Stat Priorities & Ranges",
757757
"StatMax": "Max",
758758
"StatMin": "Min",
@@ -761,7 +761,8 @@
761761
"TierNumber": "T{{tier}}",
762762
"UnableToAddAllMods": "Unable to add all mods.",
763763
"UnableToAddAllModsBody": "There weren't enough mod slots available to fit {{mods}}.",
764-
"UnlockItem": "Unpin Item"
764+
"UnlockItem": "Unpin Item",
765+
"WhySlow": "Why is this slow?"
765766
},
766767
"LoadoutFilter": {
767768
"Contains": "Shows loadouts which have an item or a mod matching the filter text. Search for items with spaces in their name using quotes.",

0 commit comments

Comments
 (0)