Skip to content
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

Avoid using java.util collections in GWT code #4166

Merged
merged 1 commit into from
May 25, 2018
Merged

Conversation

Legioth
Copy link
Member

@Legioth Legioth commented May 24, 2018

This reduces the gzipped size of the client engine by around 10% from
48864 to 44808 bytes.


This change is Reviewable

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • MINOR 1 minor

Watch the comments in this conversation to review them.

lazyDependencies.putAll(extractLazyDependenciesAndLoadOthers(
entry.getKey(), entry.getValue()));
}
clientDependencies.forEach((dependencies, mode) -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

MINOR Remove useless curly braces around statement rule

@denis-anisimov
Copy link
Contributor

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


flow-client/src/main/java/com/vaadin/client/DependencyLoader.java, line 163 at r1 (raw file):

        JsMap<String, BiConsumer<String, ResourceLoadListener>> lazyDependencies = JsCollections
                .map();

Is it a replacement for LinkedHashMap ? So it preserves the order ?


Comments from Reviewable

@Legioth
Copy link
Member Author

Legioth commented May 25, 2018

Review status: all files reviewed at latest revision, 2 unresolved discussions.


flow-client/src/main/java/com/vaadin/client/DependencyLoader.java, line 163 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
        JsMap<String, BiConsumer<String, ResourceLoadListener>> lazyDependencies = JsCollections
                .map();

Is it a replacement for LinkedHashMap ? So it preserves the order ?

A Map object iterates its elements in insertion order according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map


Comments from Reviewable

@denis-anisimov
Copy link
Contributor

:lgtm:


Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

This reduces the gzipped size of the client engine by around 10% from
48864 to 44808 bytes.
@caalador
Copy link
Contributor

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@ZheSun88 ZheSun88 merged commit 8b9673d into master May 25, 2018
@ZheSun88 ZheSun88 deleted the avoidCollections branch May 25, 2018 09:24
@denis-anisimov denis-anisimov added this to the 1.0.0.rc1 milestone May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants