Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b3d5042
Initial commite copy of updated wc implementation
Jun 19, 2025
7d83e7d
Add buttons, and move to next page functionality
Jun 20, 2025
2cc9977
Added indexed db functionality
Jun 20, 2025
a96d96d
Implement add items step
Jun 20, 2025
32efb62
Added toggle step, pending delete step (logic to delete from the db?)
Jun 20, 2025
8b074f2
Add remove step
Jun 23, 2025
5566de1
Fix button order
Jun 24, 2025
175bb47
Delete node_modules folder
Aug 11, 2025
b78559c
Don't measure writing time
Aug 11, 2025
741bf07
Remomve old indexeddb protype and wc changes
Aug 11, 2025
5a858ef
Update indexedDB to use latest version of wc
Aug 11, 2025
db24979
Update test files
Oct 8, 2025
bc975a4
Add dixiejs version and differentiate through the route
Oct 21, 2025
eeea2a0
Throw earlier when opening dbs
Oct 21, 2025
e04d2c3
Update README
Oct 21, 2025
5a12708
format and add coment
Oct 22, 2025
f388b9d
Remove unnecesary asyncs, use transaction commit and oncompleted in t…
Oct 24, 2025
ee93eff
Use async functions, move tests to experimental folder
Nov 6, 2025
191e9b7
Fix bad merge
Nov 6, 2025
a67f387
Vanilla indexedDb working
Nov 7, 2025
5e21c77
Use remote runner
Nov 7, 2025
1b12246
Properly exclude steps
Nov 8, 2025
d3bc874
Remove unused helpers in Page class
Nov 8, 2025
39315c6
Remove extra comments
Dec 1, 2025
e1cdf03
Fix incorrect usage of sync test runner, remove comments, close datab…
Dec 12, 2025
aaac0e0
Fix runner issues, improve promises
Dec 12, 2025
253f103
Addressed pr feedback (#42)
issackjohn Feb 5, 2026
d137671
Fix formatting in toggleTodo
issackjohn Feb 5, 2026
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