Discourse running very slow on local machine

AI-generated summary

A user, hbm, reports that their Discourse instance running on a local Ubuntu laptop with MongoDB is slow, with each page request taking around 1 second. The machine specs include a Core i5-4300 1.9GHz CPU, 4GB RAM, and an SSD, running bare metal. Stephen asks for more details about the hardware and environment, noting that the issue is likely configuration-related and moves the discussion to Development. Falco explains that development mode is inherently slower due to live code reloading and points out that the 1.9GHz CPU is underpowered compared to modern standards. hbm clarifies that the purpose is to understand the development workflow, not to build a plugin or theme. pfaffman suggests using the Theme Creator and Theme CLI for theme development, which doesn’t require a full dev setup, and notes that a faster machine is recommended for plugin development.

I installed a discourse instance in my local ubuntu laptop with MongoDB to try it out. I took the steps in https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727

Each page request typically takes 1 second.

I wonder is there an configuration issue ?

Without more information it’s hard to say.

What kind of spec is the laptop? Does it have SSD? Is the ubuntu installation bare metal, or inside a VM? How heavily utilized is the hardware?

I’ve moved this to Development as you’re using a development installation.

Thanks Stephen for following up.
Machine is in lower-end

  • cpu: Core i5-4300 1.9G Hz
  • ram: 4G
  • ssd
  • ubuntu bare metal.
  • hardware is dedicated for the testing, no other tasks.

Log is attached at https://gist.github.com/csc221/24368d177ecd3c7935e3d06d23c25d32

In particular, I notice this line.

|Completed 200 OK in 660ms (Views: 0.4ms | ActiveRecord: 249.7ms | Allocations: 198144)|
| --- | --- | --- |
||

In development mode it is indeed slow, as you can edit source code, hit refresh and the new code is already running for the next request.

The 1.9GHz processor also doesn’t help, as most developer machines nowadays are over 4GHz.

What is the purpose of your development install? Are you writing a Discourse plugin? A theme? Writing a pull request?

Thanks for clarifying. This makes sense. I’m trying out the dev install to understand the dev workflow, no immediate purpose in mind.

You can do lots of customization with theme components and do that development with the Beginners’ guide to using Theme Creator and Theme CLI to start building a Discourse theme.

For plugins you do need a full dev setup and will probably want a faster machine.

Thanks for suggestions!