Feature/map list optimizations - #844
Merged
GoogleFrog merged 6 commits intoApr 11, 2023
Merged
Conversation
moreginger
commented
Mar 11, 2023
| mapItem.TerrainType = ToTerrainType(mapItem) | ||
| mapItems[#mapItems+1] = mapItem | ||
| end | ||
| table.sort(mapItems, function(l, r) return l.Name:upper() < r.Name:upper() end) |
Author
There was a problem hiding this comment.
Bonus feature, make the paged loading of map items not populate the table in a funny order.
moreginger
commented
Mar 11, 2023
| end | ||
|
|
||
| table.merge(obj[i], v) | ||
| if (t == "metatable") then |
Author
There was a problem hiding this comment.
It doesn't seem likely this branch does anything. How would type(v) be "metatable"?
moreginger
commented
Mar 11, 2023
| return newTable | ||
| end | ||
|
|
||
| function table:arrayshallowcopy() |
Author
There was a problem hiding this comment.
Removed this function as it is unused and broken.
moreginger
commented
Mar 11, 2023
| end | ||
| end | ||
|
|
||
| function table:arraymap(fun) |
Author
There was a problem hiding this comment.
Removed this function as it is unused and broken.
moreginger
commented
Mar 11, 2023
| elseif sv then | ||
| table.merge(sv, v) | ||
| else | ||
| self[i] = table.deepcopy(v) |
Author
There was a problem hiding this comment.
deepcopy is faster than recursive merge if we know we are copying
moreginger
marked this pull request as ready for review
March 11, 2023 15:45
…point in time. Not for something that is meant to be a noop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The return of #798
I think wrapping text is OK?
Timed
AddTheNextBatchOfMapsbefore: 0.29s after 0.25s