# Optimization Concepts

Earlier we discussed finding performance issues now we ready to start fixing them. To help you find the most useful optimizations for the items you have already identified the following section will be written more as a reference and organized into several categories.

### Overall Application Structure (or Communication)

If the problem seems to be broad and not limited to individual functions or loops, then this might be the place to look. These optimization concepts will be related to the overall structure of your application or a subset of your application. There will be a strong emphasis on communication and messaging techniques here as large systemic problems usually are techniques related to how different parts of the system communicate.

### Structures and Algorithms

We will not have all the structures and algorithms here as there are many excellent books on the subject but we will discuss the basics and some that are particularly useful in JavaScript.

### JavaScript

JavaScript is a scripting language that is compiled by the JavaScript engine before running and knowing how modern JavaScript engines do their optimizations will let us optimize our code to make the engines more efficient.

### Browser

While JavaScript has its specifics, the way browsers implement JavaScript adds some additional areas where we want to be aware of in our optimizations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.jedjs.com/untitled-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
