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

Split `DuplicatePropertyNamesChecker` #611

Closed
Lingxi-Li opened this Issue Jun 29, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@Lingxi-Li
Contributor

Lingxi-Li commented Jun 29, 2016

This DuplicatePropertyNamesChecker class is used by both reader and writer. Yet, for writer, only a very limited part of its functionality has been actually used. Specifically, only 3/14 methods in its interface are used by writer.

Method Reader Writer
CheckForDuplicatePropertyNames O O
CheckForDuplicatePropertyNamesOnNestedResourceInfoStart O
CheckForDuplicatePropertyNamesAndGetAssociationLink* O O
CheckForDuplicateAssociationLinkNamesAndGetNestedResourceInfo* O O
Add/GetODataScopeAnnotation(s) O
Add/GetCustomScopeAnnotation(s) O
Add/GetODataPropertyAnnotation(s) O
Add/GetCustomPropertyAnnotation(s) O
MarkPropertyAsProcessed O
CheckIfPropertyOpenForAnnotations O

Moreover, with respect to the two asterisk-marked methods, the return value is not used by writer. That is, the record-keeping work done is unnecessary on the writer side.

Therefore, the task is to:

  • Extract from the heavy DuplicatePropertyNamesChecker class a new light-weight and specialized class for writer use. This gives improved performance on writer side.
  • Rename DuplicatePropertyNamesChecker. The class does much more than just checking for duplicate property names. This improves code maintainability.

@Lingxi-Li Lingxi-Li self-assigned this Jun 29, 2016

Lingxi-Li added a commit that referenced this issue Jul 4, 2016

Add `DuplicatePropertyNameChecker` to replace `DuplicatePropertyName(…
…s)Checker` on writer side (#611)

Improves writer-side performance.

Lingxi-Li added a commit that referenced this issue Jul 5, 2016

@Lingxi-Li Lingxi-Li closed this Jul 5, 2016

@LaylaLiu LaylaLiu removed the in-progress label Jul 5, 2016

@Zoe-ms

This comment has been minimized.

Contributor

Zoe-ms commented Aug 4, 2016

Link to: ODL Writer perf improvement #558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment