# How to setup a Tryton development environment?

**URL:** https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193
**Category:** Developer
**Created:** [January 13, 2025, 11:00am UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193 "2025-01-13T11:00:37Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Benoit](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/5daacb/32.png) [@Benoit](https://discuss.tryton.org/u/Benoit)
#### Post date: [January 13, 2025, 11:00am UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/1 "2025-01-13T11:00:37Z")

</div>

Hello,

I work with Tryton for 2 years (as Project Manager on Tryton projects) and we are experiencing performance problems (several minutes to update Tryton when we modify a model) with our development environment.

I think the problem comes the way we develop with Tryton.

I’d like to ensure that the way we define our development environment is ok.

We use git for code managment, visual studio code (on windows) as IDE.

What are the best practices to create a development environment with constraints above ?

Currently we have a docker container we are connected to. We modify Tryton code directly into the container and restarts tryton server after each code modification. The postgreSQL server is an other container on a VM (not on the developer computer)

Thank’s for the help you can give me.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 13, 2025, 11:15am UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/2 "2025-01-13T11:15:15Z")

</div>

> [@Benoit](#):
>
> we are experiencing performance problems (several minutes to update Tryton when we modify a model) with our development environment.

Could you give more detail on which operation does it spend much time?

---

<div class="post-metadata">

### Author: ![JCavallo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@JCavallo](https://discuss.tryton.org/u/JCavallo)
#### Post date: [January 13, 2025, 11:36am UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/3 "2025-01-13T11:36:37Z")

</div>

How many module are you currently using in your development environment?

---

<div class="post-metadata">

### Author: ![Benoit](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/5daacb/32.png) [@Benoit](https://discuss.tryton.org/u/Benoit)
#### Post date: [January 13, 2025, 12:57pm UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/4 "2025-01-13T12:57:53Z")

</div>

For example, after adding a property to a model, I run _trytond-admin -d tryton --all_ to upgrade the database and it can take more than 5 minutes !

We use 109 modules (standard and customized).

---

<div class="post-metadata">

### Author: ![JCavallo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@JCavallo](https://discuss.tryton.org/u/JCavallo)
#### Post date: [January 13, 2025, 1:24pm UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/5 "2025-01-13T13:24:04Z")

</div>

> [@Benoit](#):
>
> For example, after adding a property to a model, I run _trytond-admin -d tryton --all_ to upgrade the database and it can take more than 5 minutes !

You woul usually only need to update the module you modified, and then only if you actually added a new field / xml record.

I am working with over 200 modules for a development instance, and yes a full upgrade takes time, but I usually avoid those when working on a feature in a given module, and only upgrade this module.

---

<div class="post-metadata">

### Author: ![Benoit](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/5daacb/32.png) [@Benoit](https://discuss.tryton.org/u/Benoit)
#### Post date: [January 13, 2025, 2:40pm UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/6 "2025-01-13T14:40:50Z")

</div>

Thank’s for the advice, we will try to update only modified modules.

Is there logging that can help to know what is long during upgrade ?

---

<div class="post-metadata">

### Author: ![JCavallo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/j/48db29/32.png) [@JCavallo](https://discuss.tryton.org/u/JCavallo)
#### Post date: [January 13, 2025, 3:28pm UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/7 "2025-01-13T15:28:03Z")

</div>

You should use the `-v` parameter for increased verbosity.

I have also very rarely noticed temporary problems on specific queries on Postgres’ `information_schema` (which Tryton uses a lot during the upgrade process). When those happen (they disappear on their own after a time), the upgrade process can literally take hours, and I strongly suspect that occurs more frequently with Postgres running in a docker, so maybe switching to a local postgres install / Linux environments may help.

---

<div class="post-metadata">

### Author: ![david\_auto](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/c77e96/32.png) [@david\_auto](https://discuss.tryton.org/u/david_auto)
#### Post date: [January 14, 2025, 9:50am UTC](https://discuss.tryton.org/t/how-to-setup-a-tryton-development-environment/8193/8 "2025-01-14T09:50:44Z")

</div>

Hello, have you tried launching Tryton with the development command: `trytond -c config -d database --dev`
