GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — perf(core): let views that paint their own box styles skip derived box state by triniwiz · Pull Request #11595 · NativeScript/NativeScript

Conversation

@triniwiz

@triniwiz triniwiz commented Nov 1, 2026

Copy link
Copy Markdown
Member

Lets a view tell core it paints its own padding, borders and backgrounds, so core can skip the state it would derive from them.

What changes

A view can set _appliesOwnBoxStyle = true. For those views:

  • style values are stored, read back and cascaded exactly as before;
  • core skips the derived state it builds from them:
    • effectivePadding* and effectiveBorder*Width;
    • the Background object it rebuilds on every background, border, radius, box-shadow or clip-path change.

Views that don't set the flag behave exactly as before.

The use case is a layout plugin that draws boxes itself. @triniwiz/nativescript-masonkit paints these properties natively and never reads the derived state, but core still rebuilt it for every declaration on every view. Older cores ignore the flag, so the plugin can set it unconditionally.

Numbers

xplat-benchmarks ns-core-mason-perf, with masonkit setting the flag, size M, interleaved runs. Time to attach:

scenario iOS simulator Android emulator
styled-cards 0.93 0.90
tree-fanout 0.94 0.95
flex-wrap-tiles 0.95 0.96
grid-dashboard 0.95 n/a

Screenshots were identical.

Testing

  • New own-box-style.spec.ts. A flagged view keeps its style values but skips the derived paddings, border widths and Background. An unflagged view still derives them.
  • All core unit tests pass (645).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@triniwiz
perf(core): let views that paint their own box styles skip derived bo…
1fdc8bb
…x state

A view can set _appliesOwnBoxStyle to tell core it applies its own padding, borders, border radii, backgrounds, box shadows and clip path. For those views the style values are still stored and read back as usual, but core skips the state it derives from them (effective paddings and border widths, and the Background object rebuilt on each change). Views that don't set the flag behave exactly as before.
@nx-cloud

nx-cloud Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1fdc8bb

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 20s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-01 03:00:33 UTC

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11595
npm i https://pkg.pr.new/@nativescript/vite@11595
npm i https://pkg.pr.new/@nativescript/webpack@11595

commit: 1fdc8bb

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@triniwiz
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.