Finding slow Odoo screens with the built-in profiler starts with one recorded request
The built-in profiler records a single request and shows where its time goes, so it answers which code path is slow, not how to fix it. Use it when users report a slow Odoo screen and you need evidence before you change code, configuration or infrastructure. Teams usually need it in three situations: after a specific screen is reported as slow, after a module update changes behavior, and before a wider performance review starts. In a performance audit, profiling is one diagnostic step among several. The audit also checks deployment and worker setup, PostgreSQL health and data growth, so a profile should narrow the question rather than close it.
Before recording anything, confirm how your Odoo version enables the profiler, either from developer mode or through code, and who on your team is allowed to turn it on. Check the Odoo documentation for your exact version, because the enabling steps and output options can differ between releases. Plan the reproduction carefully. Use a named test user, the company and records that trigger the complaint, and one action per recording so the trace stays readable. Where possible, reproduce on a staging copy with production-like data. Profiling adds overhead, so agree in advance who records traces on production, when, and how long the profiler stays on.
A profile is a diagnostic record, not a fix. Its job is to tell you whether the time is spent in standard Odoo code, in a custom module, or in database work triggered by that code, and each answer leads to a different next step. Keep the recording, the user, the data set and the Odoo version together, so you can compare before and after a change or a module update. A trace that cannot be reproduced or compared is weak evidence. Record the slow request first, then decide what to change, and make sure whoever owns the custom module reviews the findings before any code is altered.
Ways to turn the profiler on
Developer mode is the most common route for administrators and functional consultants who want to look at a slow screen without touching code. It is turned on from the web client, which adds developer tools and debug options to the interface. From there, a user with the right access can trigger a recorded request for the page they are on, then download the result for analysis. Because the switch sits in the interface, it is usually the first thing a support team tries.
- Who uses it: administrators and functional consultants reproducing a slow action on a screen they already know.
- Where it applies: best suited to test and staging copies, where recording a request costs little and nobody depends on the outcome.
- Access: developer mode should be limited to people who already hold the rights to see the data on that screen, because the recorded request can expose record details.
- Exact steps: the menu path and the options shown depend on the Odoo version in use, so confirm them against your version before writing a runbook.
- Leaving it on: the developer mode setting stays active for that session, so remind users to switch it off when the investigation ends.
Check which user groups can open developer tools in your environment before you hand this method to a wider team.
Developers who need repeatable results often enable the profiler from code or through a request parameter instead of clicking through the interface. This route suits a reproducible test case, a script that runs the same action several times, or a custom module where a developer wants to profile one method. The setting is applied to a specific request, so the scope is narrower than a global switch. Results are then compared across runs rather than read once.
- Who uses it: module developers and the engineers who maintain custom code.
- Where it applies: development and test servers, and occasionally a controlled reproduction on a staging copy.
- Repeatability: scripted requests make before and after comparisons possible when a fix is made.
- Parameter names: the exact parameter or configuration key depends on the Odoo version, so confirm it in the documentation for the release you run.
- Scope control: keep the profiling code path out of shared production modules so that a forgotten test hook does not reach users.
Before relying on a code-based switch, ask your developers to show the exact request they will record, and confirm that the same request works on the version your team operates.
Test and staging environments are where the profiler belongs for most investigations. A staging copy with a realistic data volume shows where time is spent, and a team can record requests as often as needed without affecting users. The main condition is that the copy must reflect production closely enough that the results mean something. A small or empty database can hide the very queries that slow the production screen.
- Data volume: a copy with much less data than production may hide the queries that dominate real use.
- Module parity: the same custom modules and versions should be installed, or the profile will not point to the right code.
- Neutralized copies: duplicated databases with outgoing features switched off are suitable for profiling, since no real messages or integrations run.
- Refresh timing: refresh the copy on a schedule so results match current data growth.
- Records: keep the recorded files and the request used to create them, so a later fix can be measured against the same baseline.
Confirm with your team how closely the staging database matches production in size and configuration before you treat its timings as evidence.
Turning the profiler on in production is sometimes needed when a problem appears only under live load, but it carries a cost that teams often underestimate. Profiling records detailed information about each request it covers, which adds overhead to the server and can expose sensitive record content in the output. If it stays on after the investigation, the server does more work than it should for every user, and the files it writes can accumulate on disk. Treat production profiling as a time-limited, approved change.
- Overhead: profiling adds work to each request it records, so the impact on users is larger under heavy load.
- Data exposure: the recorded files can include query details and record values, so restrict who can download and store them.
- Change control: record who enabled the profiler, when, and for which request, and set a removal step in the same ticket.
- Disk use: confirm where the output is written and how much space it can consume before you start.
- Alternatives: where possible, reproduce the issue on a staging copy first and use production only to confirm the result.
Before any production session, confirm the removal step, the people allowed to view the output, and the disk and log locations with your platform team.
How to record a slow request in speedscope
This sequence turns one slow Odoo screen into a single, filterable profile recording that shows which requests ran, how many SQL queries they issued and where the time went. It gives your team evidence to compare before and after a fix.
Choose a test copy or quiet window
Pick a staging copy that holds data similar in volume to production, or a low-traffic window on production if a test copy is not available. Confirm with the administrator that no scheduled actions or imports will run during the recording, because they would appear in the same profile. Record the Odoo version, the database name and the exact user account you will use, so the result can be repeated later. The step is done when everyone agrees on the environment and the timing.
Enable the profiler for one session
Turn on the profiler from developer mode or from configuration code, as your Odoo version documents it. Confirm the setting is limited to the person doing the test and is switched off afterwards, because profiling adds overhead and stores detail that should not stay on a shared system. Check that the profiler control appears in the interface before you continue. The step is done when a test request shows that recording is active.
Reproduce the slow screen once
Sign in with the chosen account, open the screen cold, and perform only the action that feels slow, such as opening a form or running a search. Avoid clicking around other menus, since unrelated requests will widen the recording and make it harder to read. Note the time of the action and the record or filter used. The step is done when the action has finished and you have written down exactly what you did.
Save the recording to a file
Stop recording and export or download the profile output as a file, keeping the database name, Odoo version and action in the file name. Confirm the file opens and is not empty, and that it contains the request you just made. Keep the raw file unchanged so a colleague can load the same evidence later. The step is done when the saved file is stored in the team's shared location with a note of what it covers.
Load the recording in speedscope
Open the saved file in speedscope and confirm that the output format is one speedscope can read for your Odoo version, since the profile format and tooling must be verified per version before you rely on the results. Check the profile's total time and the list of sampled frames against the time you saw in the browser. The step is done when speedscope shows a timeline that matches the action you performed.
Filter the profile to the request
Use speedscope's views to narrow the timeline to the single HTTP request that produced the slow screen, and note the SQL query count reported for that request. Ignore asset loading or background calls that are not part of the action. Confirm the filtered view still includes the expensive frames you saw in the full profile. The step is done when you can name the request, its duration and its query count.
Repeat the same action for comparison
Perform the identical action again with the same account, record and filter, and save a second recording using the same naming pattern. Compare the two filtered views to confirm the slow result is consistent and not caused by a cold cache or a one-off load. If the timings differ widely, record a third time before drawing conclusions. The step is done when two comparable recordings show the same pattern of slow frames.
Reading SQL counts and flame graphs without guessing
Start with the SQL count, not the flame graph. A profiled request that runs a large number of queries, many of them identical apart from their parameters, usually points to a loop that calls the ORM once per record. Look for the same statement repeated with different IDs in the SQL view of the profile, then trace which Python line issued it. A single slow query behaves differently: one statement carries most of the elapsed time, its count stays low, and the fix is usually an index, a narrower query or a changed filter. Reading these two patterns correctly decides whether you tune the database or rewrite the code that calls it, so record the count and the repetition before you look at timing.
In the flame graph opened in speedscope, the width of each block is its share of the sampled time, not its position in the sequence. Wide blocks near the top of the stack are the candidates, but a wide block that contains many narrow children is often a framework call that only passes work along. Follow the widest path down until you reach code you recognize, either a standard Odoo method or a function in a custom module. The question to answer is which call stack owns most of the time and whether that stack sits in code you can change. Note the module path on each frame so the finding can be assigned to the right owner.
Do not draw conclusions from one run. Cache state, a cold worker, a background job competing for the same database or a single user's large dataset can all shift the profile. Record at least several requests to the same screen with comparable data, confirm that the same stack and the same repeated queries appear each time, and compare against a staging copy with similar record volumes if production data cannot be profiled directly. Ask the team that owns the workload which dataset they expect the screen to handle, because a profile taken on a small test database may hide the problem entirely. Only after the pattern holds across runs should you plan a change.
Telling standard Odoo code from custom module bottlenecks
A profile shows where time goes, not whose code caused it. The cards below group the usual sources of slow requests by the evidence they leave in a recording and the next step each one calls for. Use them to decide whether a fix belongs in your data, your database, your custom code or a third-party module before anyone changes anything.
Core Odoo app methods
Time spent inside methods defined in standard apps such as Sales, Accounting or Inventory shows up under module paths in the core addons tree. Repeated calls from a standard list view with many records often point to growth in your data rather than a defect in the core code. Check record counts, the SQL count per request, and whether the same method dominates across several screens before treating it as a product issue.
Inherited methods in custom modules
A custom module that extends a standard method with _inherit appears in the stack as a second frame around the core call. Look for the custom frame wrapping a standard method whose own time is small but whose total grows with the number of records. The next step is a code review of the override, especially any loop that runs a query per record instead of one batched query.
Custom computed fields and searches
Compute methods without store=True run on every read, and the profile shows them as repeated SQL statements tied to one custom field name. Stored computed fields with long dependency chains can trigger large recomputations during writes. Check which fields appear in the slow query list, whether they need an index for the search or sort used on the screen, and whether a batched computation would remove the per-record queries.
Custom reports and data exports
Report rendering and large exports often spend most of their time in Python loops over records, or in report templates that touch related records one at a time. In a profile these appear as a long single request with a high SQL count tied to a report or export action. Compare the same report with a small test set and with production volume. If the time scales with rows, the fix is usually in the query design or the data volume, not the rendering engine.
Third-party and OCA modules
Modules from the Odoo Apps Store or the Odoo Community Association run in the same process and appear in the profile exactly like your own code. Record which module paths dominate, the installed version, and whether the module is in use on the slow screen at all. Then check the vendor's or community's release notes and issue tracker for a known problem before patching locally, since a local patch will need to survive future upgrades.
Which profiling approach fits which situation
This table compares profiling in developer mode, profiling from code for one specific path, and profiling on a staging copy against production. Read each row to see when the approach fits, what data it needs, what it risks for users and how much effort it asks of your team. The main takeaway is that a neutralized staging copy with production-like data volume usually gives the most representative results.
| Approach | When it fits | Data needed and risks to users | Effort for the team |
|---|---|---|---|
| Developer mode on a live screen | Quick checks of a single slow screen when a support user can reproduce it | Reads real production data; a short slowdown is possible if the request is heavy; profiling output may expose record names | Low, but a developer needs access to the instance and clear reproduction steps |
| Profiling from code for one path | A known slow action, such as a report or a custom button, that you want to isolate | Needs a code change or shell session; the wrapper must be removed afterward so it does not run for every user | Moderate; someone must write, test and revert the instrumentation |
| Profiling on a neutralized staging copy | Comparing before and after a fix, or testing a suspected module before it reaches production | No effect on live users; data volume must match production or results may mislead; neutralization must be confirmed | Moderate to high; the copy must be refreshed and kept close to production settings |
| Profiling on production during a quiet window | Confirming a problem that only appears under real load and real data | Affects live users if the request is heavy; agree on a window and a rollback plan first | Moderate; needs coordination with operations and business owners |
| Reading SQL counts only | Spotting N+1 query patterns in a custom module before deeper analysis | Low risk; needs the request to run with logging enabled on the same instance | Low; mostly reading output in the browser or logs |
| Reading flame graphs in speedscope | Finding which Python functions take the most time, including standard Odoo code | Needs a captured profile file; share it only with the team, as it can include internal paths | Moderate; engineers need to interpret call stacks and separate standard code from custom code |
| Standard code or custom module bottleneck | Deciding whether to tune the server or fix a custom module | Compare the same request on a clean database with and without the custom module enabled | Moderate; requires a test environment with the module toggled on and off |
Questions teams ask before profiling Odoo screens
Is the Odoo profiler safe to run on a production database?
Usually yes, with care. The profiler records timings and SQL statements for the requests you choose, so it adds overhead to those requests and can write profile data to disk or the database. Turn it on for a narrow window, profile one user action at a time, and turn it off afterwards. Confirm with your Odoo version's documentation how profiling is enabled on your deployment, and check who can switch it on, because the profiler exposes internal request detail that should stay with administrators. Most teams run the first pass on a staging copy with production-like data, then confirm findings on production.
Can our own team profile slow Odoo screens without a partner?
Yes, if you have a Python developer who knows Odoo's ORM and a database administrator who can read PostgreSQL query plans. The work needs shell or SSH access to the Odoo server, access to the Odoo database, permission to enable developer mode and the profiler, and the ability to reproduce the slow action with realistic data. Teams without that mix often stall at interpreting the output, because a high SQL count can come from standard code, a custom module, or missing indexes, and telling them apart takes experience.
What skills and access does a profiling review need?
Plan for three skill sets: Odoo development (reading ORM calls and module inheritance), PostgreSQL administration (reading slow queries and indexes), and operations (reaching the server, logs and a staging copy). Access typically includes a named test user with the role that sees the slow screen, a copy of the database with its filestore, read access to the custom module source code, and the Odoo and PostgreSQL logs for the same time window. Ask for these in writing before work starts so the first session is not spent waiting for access.
How long does a first profiling pass usually take?
The duration depends on how many screens are in scope, how much custom code sits behind them, and how quickly access is granted. A first pass usually covers a short list of screens that users report as slow, then ends with a ranked list of causes. Ask any provider to state the number of screens, the environments used, the access they need, and what the written deliverable contains. Any duration quoted before those points are fixed is a guess.
What drives the effort and cost of profiling Odoo?
Cost follows the work, not the tool. The main drivers are the number of screens in scope, the volume and age of custom module code, database size and growth, how many Odoo apps and integrations touch the slow action, the access you can provide, and whether the engagement stops at a findings report or continues into fixes and a retest. Profiling itself is one part of a wider performance review. Ask for a quote that lists screens, environments, deliverables, and whether fixes are included or priced separately.
Does profiling alone fix slow Odoo screens?
No. Profiling finds where time goes, but it does not change the code, the indexes, the worker settings or the data. Fixes often include adding an index for a custom field, reducing N+1 queries in a custom module, adjusting worker and PostgreSQL settings, or changing a report that loads too many records. Each fix needs a retest on a realistic copy, and some fixes need a change window. Budget for the fix work separately from the diagnosis, and agree on how success will be measured before the first change.
What should we expect a partner to charge for a profiling review?
DeployOpen does not publish a price list. A quote follows from a written scope that names the screens, the environments, the access provided, the deliverables and whether fixes are included. Most engagements are fixed-scope, so the scope is agreed in writing before work starts. When comparing providers, ask each one for the same scope definition and check whether the quote includes retesting after fixes and any follow-up support.
Security and operational risks of leaving profiling on
The profiler is useful during a investigation and risky when it stays on. Profiles can capture request details, add load and storage on the server, and expose developer tooling to people who should not see it. The cards below cover the main risks and the controls that keep a profiling session contained.
Sensitive data in saved profiles
A recorded request can hold the record values, search terms, and parameters that the screen handled, so a saved profile may contain personal or financial data. Treat each recording as a copy of production data. Before you share one, check which models and fields the slow screen touched, and confirm with your data protection owner whether storing that copy is allowed. Where possible, reproduce the slowness on a copy with masked data instead.
Extra load and storage
Profiling adds work to every request it records, and recordings accumulate on disk. Keep sessions short and limited to the one screen or user under investigation. Ask your team to confirm where recordings are written, how much space they use on the Odoo host, and whether the same host also serves production traffic that a profiling session could slow down.
Profiles shared outside the team
Speedscope files and SQL output are easy to attach to tickets, chat messages, or email to an outside vendor. Once a profile leaves your environment, you cannot control who reads it. Agree on an internal sharing channel, strip recordings of data before they leave the network, and record who received each file when a partner must review one.
Developer tooling reachable by non-admins
Developer mode exposes tools and views that normal users do not need. Limit who can switch it on, and confirm which access groups in your Odoo version and hosting type can reach profiling and debug views. Review group membership after staff changes, because a profiling entry left enabled for a former contractor is a common gap.
Turning profiling off after a session
The safest state for a production database is profiling disabled. Make turning it off a required final step in your change record, and check it on the next working day as well. Confirm how your version and hosting type enable and disable the profiler, since the switch may sit in a configuration setting, a module option, or the interface.
Deleting recordings and checking retention
Decide how long profile files stay on disk and who deletes them. Remove recordings once the defect is fixed or the ticket closes, and keep only the aggregated findings your team needs. Ask your administrators to confirm whether any backup job picks up these files, because a backup may copy profiles into systems with longer retention than you intended.
How a slow screen moves from report to fix
The path starts with a user report, which is reproduced on a test copy so production users are not affected. The profiler then records the slow request, and the team reads SQL counts and the flame graph in speedscope. The key decision is where the time sits: standard Odoo code, a custom module, the database, or data volume. Each answer routes to a different next step, either a targeted fix, a performance audit, or an upgrade check.
Decision path from a user report to the fix, audit or upgrade that matches the profile.
When a profile should lead to a full performance audit
A single profiled screen is enough when one known screen is slow, the SQL count and the flame graph point to one method or one custom override, and the fix is contained within that code. A full performance audit is the right next step when the same pattern shows up on several screens, when the SQL counts look normal but response times stay high, or when the profile points to the database or the server rather than a single module. Profiling answers where time goes inside one request. It does not tell you whether the worker count, PostgreSQL configuration, or data volume is the underlying cause.
Before you hand a profile to a partner or an internal reviewer, gather the context that the profile cannot show. Record the Odoo version, the deployment type, the number of worker processes and the request timeout settings, and the approximate size of the database and filestore. Note which custom and third-party modules are installed, whether the slow screen is also slow for administrators, and whether it slows down at particular times, such as during scheduled actions. Keep the exported speedscope files with the exact date, user role and the steps that produced them, so the reviewer can reproduce the request. Confirm these settings in your own environment rather than assuming the defaults.
The wider Odoo performance audit topic and the operations hub cover the areas a profile does not reach: deployment and worker setup, PostgreSQL health, custom module code across the whole install, data growth and a prioritized fix list. Related work often sits alongside an audit, including troubleshooting scheduled actions, offloading reads to a replica, and building staging copies to test fixes safely before production. If the profile shows the database is the bottleneck, plan the PostgreSQL tuning review at the same time, since connection counts and autovacuum settings affect every screen, not only the one you profiled.
How DeployOpen scopes profiling and performance work for Odoo
A profiling engagement is only useful when the screens, environments and access are agreed before anyone opens a profiler. DeployOpen puts each of the points below into a written scope, so the findings, the fixes and the retest are clear to both sides from the start.
Agreeing the screens and environments
We start with a written list of the screens, menus and workflows users complain about, such as sales order confirmation or month-end reports, and the environment each one should be measured in. Profiling a staging copy with a different data volume or worker count than production can point to the wrong cause, so the scope names which environment the measurements come from. Ask for this list to be fixed before work begins, with the reason each screen was chosen.
Access needed for profiling
Profiling needs a non-production copy of the database with realistic data, developer mode access on the test instance, and read access to the Odoo logs and the PostgreSQL slow query log. Access to production is limited to what the scope requires, and any database copy is handled under the client's own data rules. Confirm with your security team which accounts, network paths and storage locations the engagement may use before the work starts.
What the engagement delivers
Deliverables are written down before the work starts. Typically this includes the recorded profiles for each agreed screen, a short note on the SQL counts and the largest time consumers, and a prioritized list of findings that separates standard Odoo code from custom module code. Each finding names the screen, the evidence and the suggested owner. Ask for the file formats and where they will be stored.
Agreeing fixes as a separate step
Profiling tells you where time goes. Changing the code, indexes or configuration is a separate piece of work with its own scope, review and change control. We do not fold fixes into the profiling fee by default. The findings list shows which items are configuration, which need a custom module change and which belong to Odoo core, so the client can decide what to fund and what to take to the upstream project or the vendor.
Retests after changes
After agreed fixes are deployed to the test environment, the same screens are profiled again under the same conditions as the baseline. The retest is compared with the original numbers, and the result is recorded as improved, unchanged or regressed. Retests are scoped in the same written agreement, so the client knows how many rounds are included and what happens if a fix changes another screen.
Fixed scope and a written quote
Most engagements are fixed scope, and DeployOpen does not publish a price list. The quote follows from the written scope: number of screens, environments, data volume, custom modules included and retest rounds. Ongoing support or continuous performance checks can be arranged as a retainer. Ask any provider to state in writing who performs the profiling, who owns the output and what happens to the test copies afterwards.

