[MDSAL-301] Rework javadoc generation in bindings Created: 25/Jan/18 Updated: 27/Mar/18 Resolved: 27/Mar/18 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding codegen, Binding V2 codegen |
| Affects Version/s: | None |
| Fix Version/s: | Oxygen SR1 |
| Type: | Epic | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Name: | YANG javadoc snippet optimization |
| Description |
|
This is a top-level tracker issue, which will need to be addressed in mdsal-binding-generator-impl and in mdsal-binding2-generator-impl. The code here is twisted and inefficient, causing huge memory usage for strings during code generation, especially with large models. Two things need to happen:
|
| Comments |
| Comment by Robert Varga [ 07/Feb/18 ] |
|
Actually CharSource is rather inefficient and needlessly complex. The class exposing a YANG text snippet is coming in yang-model-export-2.0.2 and it has the shape of Iterable<String>, which is perfectly fine. It will need to be integrated once we adopt yangtools-2.0.2. |
| Comment by Robert Varga [ 07/Feb/18 ] |
|
binding v1 use of YangTextSnippet: https://git.opendaylight.org/gerrit/68031 binding v2 use of YangTextSnippet: https://git.opendaylight.org/gerrit/68032
|
| Comment by Robert Varga [ 07/Feb/18 ] |
|
As it turns out, these two patches end up slimming our runtime support jars by ~260kB. |
| Comment by Robert Varga [ 14/Feb/18 ] |
|
Picking this up once again, this actually is a fault at how |
| Comment by Robert Varga [ 14/Feb/18 ] |
|
https://git.opendaylight.org/gerrit/68191 moved the template code, creating an abstract layer to make the old structure work – this needs to be followed-up with cleaning up the API and eliminating the unneeded layer. |
| Comment by Robert Varga [ 14/Feb/18 ] |
|
https://git.opendaylight.org/gerrit/68254 cleans the entire mess up, so that we properly capture state and push it towards the templates. |
| Comment by Robert Varga [ 14/Feb/18 ] |
|
JieHan2017 can you port last two patches to binding V2, please? |
| Comment by Jie Han [ 15/Feb/18 ] |
|
Yes, I will. |
| Comment by Jie Han [ 24/Feb/18 ] |
|
Ported to binding v2 master: |