-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Ability To Filter Combinations and Asynchronous Template Loading #256
Added Ability To Filter Combinations and Asynchronous Template Loading #256
Conversation
9809f53
to
eac2c0e
Compare
…into faster_results
…into faster_results
👍 for api document
Type info
I do not know about the type notation style variants,
(minimum sample) /**
* sum([1, 2, 3, 4]) => 10
*/
const sum = (arr) => arr.reduce((total, num) => total + num);
// Hide the implementation detail in the filter logic code.
combinations.filter(combination => sum(combination) === max_size);
in JavaScript, compiler does(or may) not optimize the reduce function calls to flat loop. function sum(arr, total=0) {
for (let num of arr)
total += num;
return total;
} and now sum() is a reusable function, you can make unit test
|
I implemented those changes with 7df50b9 |
@OrkunKocyigit |
This implementation only filters combination arrays rather than actual arm data. It is not aware of stats of the arms henceforth it won't effect anything on stat side. Current rule only eliminates combinations that has empty slots. If I have an 6 weapons best grid will be 6 be all of them in single grid no matter what those weapons have. This makes it to motocal ignore those grids. For a simple example on how filter works, it checks number of weapons it has. Let's say we have 6 weapons. Then it ignores any combination that has 5,4,3,2,1 or 0 weapons because they will be worse off no matter what stats they have. Current motocal does calculate for all of it and there is a lot of them.
Edit: I write in text but didn't like it so here is a pretty picture. |
@kei-gbf |
Seem Motocal already does the filtering when number of different weapon 11+ if (isValidCombination && ((totalItr <= 1024 && num <= 10) || num === 10)) {
combinations.push(temp);
maxSize = Math.max(maxSize, num);
}
however, no much demerit of the filterCombinations
This is NOT change request to support those cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 武器キャラデータの非同期読込
- 武器数が少ない時の組み合わせ数のフィルタによる最適化
- 武器数が多くなってきた場合(11種類以上)のフィルタは既に実装済みでしたが、
他のフィルタロジックを適応を見据えての拡張性有
- 武器数が多くなってきた場合(11種類以上)のフィルタは既に実装済みでしたが、
@OrkunKocyigit |
@kei-gbf |
I do not have the statistics of user-agent access log. all I know is just the support status looks not bad for me.
I think current status is ok and I have to note, we have three ways to run js code
List of new ECMA features we use now | | version | | https://babeljs.io/docs/en/babel-polyfill
we have now @babel/code 7.4.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review done
Yeah Babel polyfill to add support for browsers who doesn't support ES6. iOS 10 uses safari 11 which supports it no problem.
|
This PR aims to increase responsiveness of the result screen in application.
This PR contains following: