Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3f64e80
Initial commite copy of updated wc implementation
lpardosixtosMs Jun 19, 2025
01bbc79
Add buttons, and move to next page functionality
lpardosixtosMs Jun 20, 2025
0501904
Added indexed db functionality
lpardosixtosMs Jun 20, 2025
cd81c2a
Implement add items step
lpardosixtosMs Jun 20, 2025
6a43e6d
Added toggle step, pending delete step (logic to delete from the db?)
lpardosixtosMs Jun 20, 2025
27b7877
Add remove step
lpardosixtosMs Jun 23, 2025
455122c
Fix button order
lpardosixtosMs Jun 24, 2025
e17e1e5
Delete node_modules folder
lpardosixtosMs Aug 11, 2025
45b49d4
Don't measure writing time
lpardosixtosMs Aug 11, 2025
a7b3ded
Remomve old indexeddb protype and wc changes
lpardosixtosMs Aug 11, 2025
955bdd2
Update indexedDB to use latest version of wc
lpardosixtosMs Aug 11, 2025
e254e0f
Update test files
lpardosixtosMs Oct 8, 2025
57e7ecb
Add dixiejs version and differentiate through the route
lpardosixtosMs Oct 21, 2025
98bb32f
Throw earlier when opening dbs
lpardosixtosMs Oct 21, 2025
344f8ae
Update README
lpardosixtosMs Oct 21, 2025
c190603
format and add coment
lpardosixtosMs Oct 22, 2025
ddfac41
Remove unnecesary asyncs, use transaction commit and oncompleted in t…
lpardosixtosMs Oct 24, 2025
9e2b659
Use async functions, move tests to experimental folder
lpardosixtosMs Nov 6, 2025
15a5605
Fix bad merge
lpardosixtosMs Nov 6, 2025
55b6a0c
Vanilla indexedDb working
lpardosixtosMs Nov 7, 2025
daac2bd
Use remote runner
lpardosixtosMs Nov 7, 2025
6893e17
Properly exclude steps
lpardosixtosMs Nov 8, 2025
4535134
Remove unused helpers in Page class
lpardosixtosMs Nov 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions experimental/javascript-wc-indexeddb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
/node_modules
72 changes: 72 additions & 0 deletions experimental/javascript-wc-indexeddb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Speedometer 3.0: TodoMVC: Web Components IndexedDB

## Description

A todoMVC application implemented with native web components and indexedDB as the backing storage.
It utilizes custom elements and html templates to build reusable components.

In contrast to other workloads, this application uses an updated set of css rules and an optimized dom structure to ensure the application follows best practices in regards to accessibility.

### Benchmark steps

In contrast to other versions of the todoMVC workload, this one only shows 10 todo items at a time.

#### Add 100 items.

All the items are added to the DOM and to the database, it uses CSS to show only 10 of the items on screen.

The measured time stops when the last item has been added to the DOM, it doesn't measure the time spent to complete the database update.

#### Complete 100 items.

The benchmark runs a loop of 10 iterations. On each iteration 10 items are marked completed (in the DOM and in the database), and the "Next page" button is clicked. When moving to the next page the items in the "current page" are deleted from the DOM.

The measured time stops when the last item has been marked as completed, it doesn't measure the time spent to complete the database update.

#### Delete 100 items.

The benchmarks runs a loop of 10 iterations. On each iteration the 10 items in the current page are deleted (from the DOM and the database), and the "Previous page" button is clicked.

When moving to the previous page the previous 10 items are loaded from the database, this is included in the measured time.

## Storage Options

This application supports two different IndexedDB implementations that can be selected via URL search parameters:

- **Vanilla IndexedDB** (default): Uses the native IndexedDB API
- Access via: `http://localhost:7005/?storageType=vanilla` or `http://localhost:7005/`
- **Dexie.js**: Uses the Dexie.js wrapper library for IndexedDB
- Access via: `http://localhost:7005/?storageType=dexie`

Simply use the URL parameters to switch between implementations. The database will be reset when switching between storage types.

Navigation within the app uses simple hash-based routes like `#/active`, `#/completed`, or `#/` for all todos.

## Built steps

A simple build script copies all necessary files to a `dist` folder.
It does not rely on compilers or transpilers and serves raw html, css and js files to the user.

```
npm run build
```

## Requirements

The only requirement is an installation of Node, to be able to install dependencies and run scripts to serve a local server.

```
* Node (min version: 18.13.0)
* NPM (min version: 8.19.3)
```

## Local preview

```
terminal:
1. npm install
2. npm run dev

browser:
1. http://localhost:7005/
```
31 changes: 31 additions & 0 deletions experimental/javascript-wc-indexeddb/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="A TodoMVC workload app for Speedometer!" />
<title>TodoMVC: JavaScript Web Components</title>
<link rel="stylesheet" href="styles/global.css" />
<link rel="stylesheet" href="styles/header.css" />
<link rel="stylesheet" href="styles/footer.css" />
<!-- load these first, so that they are registered by the time the app components needs them -->
<script type="module" src="src/components/todo-topbar/todo-topbar.component.js"></script>
<script type="module" src="src/components/todo-list/todo-list.component.js"></script>
<script type="module" src="src/components/todo-bottombar/todo-bottombar.component.js"></script>
<script type="module" src="src/components/todo-app/todo-app.component.js"></script>
</head>

<body>
<header class="header">
<a href="#" style="text-decoration: none"><h1 class="title">todos</h1></a>
</header>
<todo-app></todo-app>
<footer class="footer">
<p class="footer-text">Click on input field to write your todo.</p>
<p class="footer-text">At least one character is needed to be a valid entry.</p>
<p class="footer-text">Press 'enter' to add the todo.</p>
<p class="footer-text">Double-click to edit a todo</p>
</footer>
<script type="module" src="src/index.mjs"></script>
</body>
</html>
Loading
Loading