# iReaderAndroid/X2C

Increase layout loading speed 200%

Repository: https://github.com/iReaderAndroid/X2C
Canonical: https://ross.abutalabs.com/products/x2c
Homepage: https://www.jianshu.com/p/c1b9ce20ceb3
Language: Java
License Family: other
Last push: 2021-01-08T09:47:18+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2933, "days_push": 2063, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2580, forks 254 (observed 2026-08-28T04:07:02.417115+00:00)

## What it is
X2C is an Android library that translates XML layouts into equivalent Java code at compile time using APT and JavaPoet, so runtime layout inflation skips XML parsing and reflection. Developers keep writing XML layouts but load them via X2C.setContentView/X2C.inflate, reportedly cutting load time by ~200%.

## Use cases
- speed up android layout inflation
- avoid xml parsing overhead at runtime
- keep xml layouts but load java code instead
- reduce layout loading time in android app startup
- replace layoutinflater inflate with faster alternative

## When to choose
- android apps with layout-heavy screens where inflation time matters
- teams wanting xml maintainability with java-level load performance

## When to avoid
- non-android projects
- projects needing actively maintained dependencies or a clear license
- teams unwilling to adopt annotation processors and custom attribute configs

## Facets
- artifact type: library
- maturity: maintenance
- function: build-tool, developer-tools, ui-components
- domain: mobile-development, android-tools, performance, developer-tools
- platform: jvm
- tags: android-layout, annotation-processor, xml-to-java, compile-time-codegen, layout-inflation, android

## Member repositories
- iReaderAndroid/X2C (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:02.417115+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:22:38.641683+00:00, confidence not recorded.
  - readme: https://github.com/iReaderAndroid/X2C (fetched 2026-08-28T04:07:02.417115+00:00, sha 85ccb81dc294)
  - homepage: https://www.jianshu.com/p/c1b9ce20ceb3 (fetched 2026-08-29T10:05:07.779367+00:00, sha addd9d13c622)
- Data as of 2026-08-30T08:39:29.467469+00:00.
