DEV Community

Cover image for Performance Comparison: React vs WebForms Core
Elanat Framework
Elanat Framework

Posted on

Performance Comparison: React vs WebForms Core

Focus on Network Requests, Bandwidth Consumption, and Client Execution Model

In modern web architectures, performance is not only about rendering speed. A critical factor is the communication pattern with the server and the volume of transferred data.

This article compares React and WebForms Core (WFC) strictly from a performance and network perspective, focusing on:

  • Initial request count
  • Secondary request count
  • Initial download size
  • Bandwidth consumption during interactions
  • Client execution model
  • React’s need for build and JSX
  • HTML structure handling in WFC

This is not a general pros/cons comparison β€” it is a technical, architectural performance analysis.


1️⃣ Initial Load Phase

React

In a typical React application, the following occurs:

  1. Download of JavaScript bundle (often hundreds of KB to multiple MBs)
  2. Download of React runtime
  3. Execution of hydration or mounting
  4. DOM generation through JavaScript

Even in optimized projects:

  • One initial HTML request
  • Multiple JS requests
  • CSS and other assets

As a result:

  • πŸ“¦ Initial payload is usually larger
  • 🌐 Higher number of initial requests
  • βš™ Initial rendering depends on JavaScript execution

WebForms Core

In WFC:

  • A standard HTML page is sent from the server
  • Optionally, a lightweight WebFormsJS file
  • No heavy bundle
  • No mandatory build pipeline

In the simplest case:

  • One HTML request
  • One small JS request

Result:

  • πŸ“¦ Smaller initial payload
  • 🌐 Fewer initial requests
  • βš™ Page contains usable HTML even before JS executes

2️⃣ User Interactions

This is where architectural differences become more significant.


Scenario A: Pure Client-Side Interaction

WFC Example (KeyUp without server call)

Server code:

public void PageLoad(HttpContext context)
{       
    WebForms form = new WebForms();

    form.SetCommentEvent("TextBox1", HtmlEvent.OnKeyUp, "keyup");
    form.StartIndex("keyup");
    form.SetBackgroundColor("TextBox1", Fetch.GetValue("TextBox1"));

    Write(form.ExportToHtmlComment());
}
Enter fullscreen mode Exit fullscreen mode

Server output:

<!--[web-forms]
EbTextBox1=onkeyup|keyup|
#=keyup
bcTextBox1=@$vTextBox1-->
<input id="TextBox1" type="text" />
Enter fullscreen mode Exit fullscreen mode

In this case:

  • No request is sent to the server
  • WebFormsJS parses the comment
  • The event is registered in the client
  • DOM is updated directly

Execution model:

Event β†’ Direct DOM manipulation
Enter fullscreen mode Exit fullscreen mode

Requests: 0
Secondary bandwidth: 0


React Equivalent

function App() {
  const [color, setColor] = useState("");

  return (
    <input
      onChange={(e) => setColor(e.target.value)}
      style={{ backgroundColor: color }}
    />
  );
}
Enter fullscreen mode Exit fullscreen mode

Execution model:

Event β†’ setState β†’ Virtual DOM diff β†’ Patch DOM
Enter fullscreen mode Exit fullscreen mode

Requests: 0
Secondary bandwidth: 0

However, internally React:

  • Maintains state
  • Executes Virtual DOM diffing
  • Triggers re-render cycles

WFC in this scenario:

  • Automatic state with server state engine
  • No diff algorithm
  • Direct DOM update

From a CPU perspective in simple cases, WFC introduces less abstraction overhead.


Scenario B: Interaction with Server

React

A typical form submission in React:

fetch("/api/contact", { method: "POST", body: data })
Enter fullscreen mode Exit fullscreen mode

Standard SPA pattern:

  • AJAX request
  • JSON response
  • State update
  • Re-render

In larger apps:

  • Multiple API endpoints
  • Parallel requests
  • Polling or WebSocket connections

React applications are generally API-driven, meaning frequent server communication.


WebForms Core

WFC preserves the traditional form model:

POST β†’ server β†’ INI response β†’ DOM patch
Enter fullscreen mode Exit fullscreen mode

The key distinction:

The server does not return full HTML.
It returns compact command instructions:

[web-forms]
sd(button)=1
nt<form>=h3
bc<h3>=green
st<h3>=Message
Enter fullscreen mode Exit fullscreen mode

In this case:

  • Only change instructions are sent
  • No full HTML re-render
  • No large JSON state tree

Bandwidth consumption is lower than full page reloads, and typically lighter than API-heavy SPA responses.


3️⃣ Request Patterns in Real Applications

React (SPA Model)

Common behavior:

  • Large bundle downloaded once
  • Then dozens or hundreds of API calls
  • Fully dependent on backend APIs

Benefit: No full page reload
Cost: Continuous API dependency


WebForms Core

Two possible patterns:

  1. Pure client-side interaction (no server calls)
  2. Lightweight roundtrip form-based interaction

In many simple UI cases:

  • No server request is required

In data-driven cases:

  • Fewer calls than API-heavy SPAs
  • Interaction is often form-based rather than endpoint-driven

4️⃣ Bandwidth Consumption

Aspect React WebForms Core
Initial download Large (bundle) Small
Client-only interaction 0 0
Server interaction JSON + state updates Compact instruction commands
API dependency High Optional

5️⃣ JSX and Build Requirement

React

React is rarely used without a build process.

Why?

  • JSX must be transpiled
  • Modules must be bundled
  • Optimizations must be applied

In React:

  • HTML is written inside JavaScript
  • UI structure depends on runtime
  • Without JS, nothing renders

WebForms Core

  • HTML remains standard
  • No JSX
  • No mandatory build step
  • View is independent and inspectable

Server logic remains separate from HTML markup.


6️⃣ Development Model Perspective

React:

  • UI = function(state)
  • State-driven
  • Re-render-driven
  • Data-centric architecture

WebForms Core:

  • UI = HTML
  • Behavior = commands
  • Event-driven
  • Command-based execution

7️⃣ Final Technical Summary

If the evaluation focuses strictly on network and bandwidth:

React

  • Larger initial payload
  • API-heavy interaction model
  • Client-side state engine

WebForms Core

  • Smaller initial payload
  • Ability to operate without server calls
  • Compact instruction-based server responses
  • No diff engine required

Summary of Network & Structural Behavior

React and WebForms Core Performance Comparison


Conclusion

React represents a full SPA architecture with a client-side state engine, requiring bundling, build pipelines, and extensive API usage.

WebForms Core represents a hybrid model that can:

  • Operate fully client-side
  • Or communicate with minimal bandwidth using compact command instructions
  • Avoid complex client state engines
  • Eliminate mandatory build pipelines

From a network and bandwidth perspective:

WebForms Core tends to be lighter in traditional, form-centric applications.
React provides stronger data-flow control in large, API-driven applications.

Top comments (0)