Skip to content

8.4 Execution Priority

When hundreds of cells are waiting to run, which one goes first? That's where execution priority comes in. This section explains how Taibles prioritizes tasks and how you can control execution order when needed.


Understanding Execution Priority

What Is Priority?

Priority determines the order in which cells execute when multiple cells are queued.

Simple analogy: Priority is like an "express lane" at the grocery store:

  • High priority = express lane (go first)
  • Normal priority = regular lane (wait your turn)
  • Low priority = back of the line

In Taibles:

Queue with 100 cells waiting:

High Priority (1000):  Cell A → Executes first
High Priority (1000):  Cell B → Executes second
Normal Priority (100): Cell C → Executes third
Normal Priority (100): Cell D → Executes fourth
...
Low Priority (1):      Cell Z → Executes last

Higher number = higher priority = executes sooner


Why Priority Matters

Without priority system:

Queue (first-in-first-out):
1. Background job (can wait)
2. Background job (can wait)
3. User's urgent request (needs now!)
4. Background job (can wait)
...

User waits while background jobs process first 😞


With priority system:

Queue (priority-ordered):
1. User's urgent request (priority 1000) ← Executes immediately
2. Dependency chain (priority 100)
3. Background job (priority 0)
4. Background job (priority 0)
...

User gets instant response


Priority Levels in Taibles

The Priority Hierarchy

Taibles uses four priority levels:

Priority LevelValueUse CaseWho Sets It
User-Triggered1000Manual recalculationYou (via UI)
Dependency Chain100Cascading updatesSystem (automatic)
Low Priority1Secondary dependenciesSystem (automatic)
Background0Automated processingSystem (automatic)

Higher value = higher priority


Priority 1000: User-Triggered (Highest)

When assigned:

  • You manually click "Recalculate cells"
  • You manually trigger a single cell
  • You manually run a column

Why highest?:

  • You're waiting for results
  • Interactive response expected
  • User experience matters most

Example:

You select 5 cells and click "Recalculate cells"
All 5 cells queued with priority 1000
Jump to front of queue
Execute before all other queued cells
You see results quickly

User interactions always go first


Priority 100: Dependency Chain (High)

When assigned:

  • Cell A completes
  • Cell B depends on Cell A
  • Cell B automatically queued with priority 100

Why high priority?:

  • Maintains automation flow
  • Prevents stalled workflows
  • Keeps dependent processing moving

Example:

Lead Enrichment Flow:
1
email_validated
Done
2
enrich_contact
Queued (priority 100)
3
classify_lead
Queued (priority 100 after enrich completes)
4
send_to_crm
Queued (priority 100 after classify completes)
All dependency chains get priority 100 → Process smoothly

Dependency chains flow quickly


Priority 1: Low Priority

When assigned:

  • Secondary dependencies
  • Cross-row dependencies (less critical)

Why lower priority?:

  • Not blocking main workflow
  • Can wait for primary tasks
  • Less time-sensitive

Example:

Order Processing:
process_order
Critical path
Priority 100
update_inventory_stats
Can wait
Priority 1
Order processes first, stats update later

Priority 0: Background Processing (Lowest)

When assigned:

  • CRON-triggered executions
  • Bulk operations (e.g., "Calculate all rows")
  • Background maintenance tasks

Why lowest priority?:

  • No user waiting
  • Not time-critical
  • Should not block interactive requests

Example:

Nightly Data Refresh (CRON, priority 0):
1,000 rows to process
Runs in background
Doesn't interfere with daytime user actions
During processing, if user triggers manual recalculation:
User's cell (priority 1000) jumps ahead
User gets instant response
Background job continues after

Background jobs stay in background


How Priority Works

The Priority Queue

Taibles maintains a priority queue:

TASK QUEUE (Sorted by Priority)
Priority 1000:Row 15, Col A (user)
← Next to execute
Priority 1000:Row 22, Col B (user)
Priority 100:Row 3, Col C (dep)
Priority 100:Row 7, Col D (dep)
Priority 1:Row 50, Col E (low)
Priority 0:Row 100, Col F (cron)
Priority 0:Row 101, Col F (cron)
... (thousands more)

Execution order:

  1. All priority 1000 tasks first (FIFO within same priority)
  2. Then all priority 100 tasks
  3. Then all priority 1 tasks
  4. Then all priority 0 tasks

FIFO Within Same Priority

When multiple cells have same priority:

Order: First-In-First-Out (FIFO) by creation time

Example:

Three cells, all priority 1000:
Cell A
Created 14:30:00
Cell B
Created 14:30:01
Cell C
Created 14:30:02
Execution order:
1
Cell A (earliest)
2
Cell B
3
Cell C (latest)

Fair ordering within same priority level ✓


Dynamic Priority

Priority is set when task is queued, not when it executes.

Example scenario:

T=0:
Cell A queued
Priority 100 (dependency)
T=1:
50 more cells queued (priority 100)
T=2:
User manually triggers Cell A again
New task created (priority 1000)
Replaces old task (priority 100)
Cell A jumps to front of queue

Recalculation updates priority


Using Priority Effectively

Method 1: Manual Recalculation (Priority 1000)

To give cells highest priority:

1
Select cells
• Click cell
• Or drag to select range
• Or Shift+click for range
• Or Ctrl/Cmd+click for multiple
2
Right-click
Context menu appears
Recalculate cells
Clear cells
Copy
3
Click "Recalculate cells"
Option near top of menu
4
Cells are re-queued
• With priority 1000
• Jump to front of queue
• Execute before all other queued cells

Result: Selected cells process immediately (or very soon)


Method 2: Single Cell Recalculation

For one cell:

1
Click the cell
Select the cell you want to prioritize
2
Right-click on the cell
Context menu appears
3
Click "Recalculate cells"
Works for single cell too
Alternative:
Double-click cell if it has a recalculate action

Result: Cell queued with priority 1000


Method 3: Column-Wide Recalculation

To prioritize entire column (all rows):

1
Click column header
Column header = name of column
2
Click three-dot menu
Or click settings icon
3
Select "Recalculate all"
May be in column menu under "Re-run"
Re-run
Empty cells
Failed cells
All cells
4
All cells queued
All cells in column queued with priority 1000

Use when: Entire column needs urgent recalculation


When to Use Priority Boost

Use Case 1: Urgent Customer Request

Scenario: Customer calls, needs order status immediately

Current state:
• 500 background orders processing
• Customer's order (row 250) still in queue
Action:
1
Find customer's row (row 250)
2
Select cells that need updating
3
Right-click → "Recalculate cells"
4
Cells jump to front of queue
Result:
Customer gets status in seconds, not minutes

Value: Immediate customer service ✓


Use Case 2: Testing New Automation

Scenario: Testing new enrichment column

Current state:
• 1,000 rows queued (rate limited, processing slowly)
• Need to test with one row immediately
Action:
1.
Add test row
2.
Select enrichment cell in test row
3.
Right-click → "Recalculate cells"
4.
Test cell processes immediately
Result: Instant feedback on automation

Value: Fast iteration cycle ✓


Use Case 3: VIP Processing

Scenario: VIP customer orders need priority processing

Component placeholder - will be implemented

Value: Differentiated service ✓


Use Case 4: Fixing Errors

Scenario: 10 cells failed, need immediate retry

Component placeholder - will be implemented

Value: Fast error recovery ✓


When NOT to Boost Priority

Don't Boost: Large Background Jobs

Component placeholder - will be implemented

Don't Boost: Routine Operations

Component placeholder - will be implemented

Don't Boost: Already Processing

Component placeholder - will be implemented

Priority and Rate Limiting

How They Interact

Priority affects queue order, rate limiting affects execution pace.

Component placeholder - will be implemented

Key insight: High-priority cells consume rate limit budget first


Priority Doesn't Skip Rate Limits

Important: Priority changes order, not rate

Component placeholder - will be implemented

Priority doesn't bypass rate limit

Both systems work together:

  • Priority: Determines which 10 cells execute first
  • Rate limit: Determines when they execute

Monitoring Priority

Visual Indicators

Currently: No special visual indicator for priority in UI

Cells look the same whether priority 1000 or priority 0:

Queued State:
Queued
Blue clock icon with pulse animation
Rate Limited State:
Rate Limited
Yellow pause icon
Note: Cells look the same whether priority 1000 or priority 0. Priority affects execution order, not visual appearance.

Execution order shows priority:

  • High-priority cells execute sooner
  • Low-priority cells wait longer

How to Infer Priority

Clues about priority:

Component placeholder - will be implemented

Testing Priority

To verify priority is working:

Component placeholder - will be implemented

If manual cell waits: Priority may not be working (check rate limits first)

If manual cell executes immediately: Priority working correctly ✓


Best Practices for Priority

Best Practice 1: Reserve Priority 1000 for Users

Best practice content

Why: Keep express lane clear for interactive use


Best Practice 2: Trust Automatic Priorities

System assigns priorities intelligently:

  • User actions: 1000 (you set these)
  • Dependencies: 100 (system sets)
  • Background: 0 (system sets)

Usually: No manual intervention needed

Only boost when you have a specific reason


Best Practice 3: Use Selectively

Priority boost is a tool, not a default:

Best practice content

Why: Priority only matters when there's competition for resources


Best Practice 4: Combine with Rate Limits

For urgent processing:

Best practice content

Best of both worlds:

  • Priority: Urgency
  • Rate limit: Safety

Best Practice 5: Document VIP Workflows

If you have VIP processing:

Best practice content

Train team on priority boosting for VIP cases


Priority System Summary

How Priority Works

Four priority levels:

  • 1000: User-triggered (highest)
  • 100: Dependency chains
  • 1: Low priority
  • 0: Background (lowest)

Execution order:

  • Higher priority executes first
  • Same priority = FIFO (first-in-first-out)

Dynamic: Priority set when task queued, can change via recalculation


How to Boost Priority

Method: Manual recalculation

  1. Select cells
  2. Right-click
  3. Click "Recalculate cells"
  4. Cells re-queued with priority 1000

Effect: Cells jump to front of queue


When to Use

Use priority boost for:

  • Urgent customer requests
  • Testing and debugging
  • VIP processing
  • Error recovery

Don't boost for:

  • Large background jobs
  • Routine operations
  • Already running cells

Priority + Rate Limiting

Both work together:

  • Priority: Determines order in queue
  • Rate limit: Determines execution pace

Priority doesn't bypass rate limits:

  • High-priority cells still respect rate limits
  • Just execute before lower-priority cells

Best Practices

Reserve priority 1000 for users: Interactive responsiveness

Trust automatic priorities: System assigns intelligently

Use selectively: Only when needed

Combine with rate limits: Safety + urgency

Document VIP workflows: Consistent priority handling


Troubleshooting Priority Issues

Issue 1: Manual Recalculation Doesn't Jump Queue

Symptom: You recalculate cells, but they wait in queue

Possible causes:

Troubleshooting content

Troubleshooting content

Issue 2: Background Jobs Blocking User Actions

Symptom: You trigger cell, but it waits behind background job

Troubleshooting content

Issue 3: All Cells Process at Same Speed

Symptom: Priority doesn't seem to affect anything

Possible causes:

Troubleshooting content

Troubleshooting content

Summary

You now understand execution priority:

Priority levels: 1000 (user) > 100 (dependency) > 1 (low) > 0 (background)

Purpose: Ensure interactive responsiveness

How to boost: Right-click → "Recalculate cells" (priority 1000)

When to use: Urgent requests, testing, VIP processing, error recovery

When NOT to use: Bulk operations, routine processing

Interaction with rate limits: Priority determines order, rate limits determine pace

Best practices: Reserve priority 1000 for users, trust automatic priorities, use selectively


Next Steps

You've completed Chapter 8: Run Modes and Execution Control! You now understand:

✅ Run modes (Once, Always, Manual, Scheduled) ✅ Rate limiting (configuration, monitoring, and priority) ✅ Execution priority (boosting urgent tasks)

Next up in your Taibles journey:

  • Advanced automation patterns
  • Custom integrations
  • Team collaboration features
  • Production optimization strategies

Continue exploring to unlock the full power of Taibles! 🚀

Built with VitePress