# Topic List Previews (TLP)

**URL:** https://meta.discourse.org/t/topic-list-previews-tlp/209973
**Category:** Theme component
**Created:** [November 23, 2021, 12:25pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973 "2021-11-23T12:25:59Z")
**Posts on this page:** 20
**Page:** 22

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 23, 2024, 7:37am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/428 "2024-01-23T07:37:06Z")

</div>

That’s a good spec! You must have a particularly busy site?

Are you sure there was no rebake occuring?

How many pictures are being posted per minute?

Preparation of Thumbnails is mostly core code and requires mandatory additional image processing.

This would be the case for any plugin or theme component of this nature.

---

<div class="post-metadata">

### Author: ![eroscripts](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eroscripts](https://meta.discourse.org/u/eroscripts)
#### Post date: [January 24, 2024, 2:41am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/429 "2024-01-24T02:41:08Z")

</div>

We turned off the plugin for about 24hr, then turned it back on for 24hr.  
Below I’m pasting notes from our other admin.

* * *

The plugin is causing jobs being scheduled to slow.  
The more jobs are in the queue, the more the CPU struggles to keep up.  
so what happens is the server sees a lot of traffic, but things seem normal for a while until the jobs start backing up.  
Eventually the CPU struggles to keep up and usage spikes up and down as it completes backlogged jobs.

That’s why we saw earlier there was 3000+ backlogged jobs.  
under normal circumstances there’s never more than 5 jobs. but almost always there are 0 because no jobs should be backlogged, they should be processed immediately.

Image attached shows the current jobs getting backlogged. Right now it’s hovering 30-35 backlogged jobs.  
All the jobs are new from the last post in the sidecar.  
I can’t tell why yet but this only happens when the plugin is on.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/6/c/26c5aabd8158363aa8684492a04210584049d89c.jpeg)

Last hour of the resources on CPU

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/c/5/fc53d4c99b06523cb7a10638c8939b375cb0f198.png)

last 24 hours, pointing out approx. where the plugin was enabled (See the up trend after the spike)

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/2/b/e2bfaf211f25432c6272edfee6e9f6a9624384f5.png)

It seems like the pattern is longer than 24 hours to notice but the plugin causes general resource usage in the 80-90+% usage most of the time.

Once we turn it off, we’ll start noticing that over the next 24 hours the server will average 60-75% and the jobs won’t get backlogged.

Also when we want to, I changed the app.yml to have 16 unicorn workers. when we want to rebuild I think we should disable the plugin, and have 16 unicorn workers. We observe the server’s performance over that period of time, and adjust the workers value to what we think is best.

Overthe last 7 days  
red = enabled  
blue = disabled

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/3/2/432c75e5fcbe652137d55ccc92bb998b4a77499d.png)

After turning on the plugin again, the CPU is spiking. I’m less confident in the jobs part being a major thing. I noticed the job counts go up with more unicorn workers. I think the number is unrelated.

I do still see the issue about the plugin holding up resources though.

Still not 100% on it but im very confident the plugin is an issue.

plugin + 16 workers: pins the server  
16 workers no plugin - working well  
plugin + 8 workers - sluggish but it works

graph after turning off the plugin

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/4/7/b474481cbd3b0d286a6e076e62c3c48d0b4ab263.png)

---

<div class="post-metadata">

### Author: ![Eviepayne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviepayne/32/352733_2.png) [@Eviepayne](https://meta.discourse.org/u/Eviepayne)
#### Post date: [January 24, 2024, 3:02am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/430 "2024-01-24T03:02:02Z")

</div>

Hi,

I’m the other admin that made those notes.  
I don’t see the jobs as being part of the issue any more.  
unfortunately I’m not knowledgable about discourses internals very much to know what could be the cause. I just know what I see currently.

It can be summarized as the site is generally sluggish when enabled with 8 workers and nearly goes down with 16 workers  
With the plugin off the site works perfectly fine and with enough workers it’s very fast.

This leads me to believe there is something with the plugin that is slowing the site either by resources or something being held up in IO or async operations perhaps.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 24, 2024, 7:07am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/431 "2024-01-24T07:07:43Z")

</div>

Please have a look at your sidekiq queue. Do you see lots of jobs queued and what are the job names?

I’m sure it’s just a backlog of thumbnail production which will settle down once all images have been processed.

That’s a core process.

You can safely remove the sidecar plugin if you don’t need its additional features and just use the Theme Component.

Can you confirm the issue persists with the Theme Component active but not the sidecar plugin?

If you’ve never had the sidecar plugin installed then the issue must be in core.

If you need help with your analysis you can hire Pavilion.

I welcome independent reports of this issue.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 24, 2024, 11:50am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/432 "2024-01-24T11:50:22Z")

</div>

> [@merefield](#):
>
> That’s a core process.

Just confirming - an increase in high-CPU image-resizing jobs is expected when you enable any kind of topic-list thumbnailing theme component 👍. Core generates the thumbnails ‘on demand’ for the first user to view a given topic in a topic list.

As @merefield mentioned, it should settle down once all thumbnails have been generated for frequently-listed topics.

Increasing the number of workers is probably not a good idea - trying to do more work in parallel on a CPU-constrained machine will make the symptoms worse. Better to keep the worker numbers as normal so that the jobs can queue up and be processed without overloading the machine.

In the sidekiq UI, you probably want to be looking at the “Busy” and “Queued” tabs. “Scheduled” jobs are the ones scheduled for a specific time in the future, and so they are very unlikely to be causing performance issues.

---

<div class="post-metadata">

### Author: ![Gonerdot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gonerdot/32/366307_2.png) [@Gonerdot](https://meta.discourse.org/u/Gonerdot)
#### Post date: [January 29, 2024, 8:24pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/433 "2024-01-29T20:24:12Z")

</div>

It looks great on preview, but in reality it’s completely different. What am I doing wrong?

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/1/9/1198533e0663379475dd6a56b0e3852e79e7d841.jpeg)

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/7/8/578056c64f31ead651eb4f85f9adccb1b1fe8772.jpeg)

Theme: [FKB Pro - Social theme - #268 by Don](https://meta.discourse.org/t/fkb-pro-social-theme/234323/268)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 29, 2024, 8:30pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/434 "2024-01-29T20:30:17Z")

</div>

> [@Gonerdot](#):
>
> Theme: [FKB Pro - Social theme - #268 by Don](https://meta.discourse.org/t/fkb-pro-social-theme/234323/268)

Many “total conversion” themes are not supported. I suspect FKB Pro has its own overrides that clash with this component. I’m afraid I can’t support this scenario.

This Theme Component is meant to be used as a building block within a theme that doesn’t try to cover all the bases.

If you want a right sidebar with Topic List Previews, try [Right Side Blocks](https://meta.discourse.org/t/right-sidebar-blocks/231067) in combo.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [January 30, 2024, 6:27am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/435 "2024-01-30T06:27:00Z")

</div>

There is small CSS/spacing issue between topic header and featured link icon thingy.

 ![IMG_2827](https://global.discourse-cdn.com/meta/original/4X/4/c/4/4c43e293c3b3f4213541a459948bfe4b4bc36f67.jpeg)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 16, 2024, 11:40am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/436 "2024-03-16T11:40:38Z")

</div>

Added an experimental feature:

[https://github.com/paviliondev/discourse-tc-topic-list-previews/pull/37](https://github.com/paviliondev/discourse-tc-topic-list-previews/pull/37)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 18, 2024, 8:47am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/437 "2024-03-18T08:47:01Z")

</div>

This is working quite well now, still behind a setting:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/2/9/4290463b43c4d2cff859014f007fef9114ba7d01.jpeg)

This is responsive to width, so only appears in Tiles (masonry) mode when the list area is wide enough.

Demo here: [https://www.starzen.space/](https://www.starzen.space/)

NB The excess padding on the bottom right is a necessary known issue due to the masonry renderer which for performance reasons (it’s fast!) renders things to the nearest grid row. Once (!) they implement native masonry in CSS grid I’ll refactor this to make it nicer.

NB#2 The screenshot also contains some controls from Discourse Bars theme component (the sidebar is hidden). Topic List Previews works really well with Discourse Bars.

---

<div class="post-metadata">

### Author: ![Ahmed26](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed26/32/347069_2.png) [@Ahmed26](https://meta.discourse.org/u/Ahmed26)
#### Post date: [March 19, 2024, 3:08pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/438 "2024-03-19T15:08:08Z")

</div>

An image for YouTube appears on the home page.

Could it be for Twitter too?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2024, 3:09pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/439 "2024-03-19T15:09:49Z")

</div>

It is not in any way restricted to youtube.

It exposes whatever the thumbnail is. If the Twitter embed creates a thumbnail, then yes.

---

<div class="post-metadata">

### Author: ![Ahmed26](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed26/32/347069_2.png) [@Ahmed26](https://meta.discourse.org/u/Ahmed26)
#### Post date: [March 20, 2024, 7:29am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/440 "2024-03-20T07:29:57Z")

</div>

Could you please tell me what settings I should choose to make it like in this picture?

I want it to be in the form of a list of thumbnails like in this picture.

image left aligned

 ![55](https://global.discourse-cdn.com/meta/original/4X/c/8/5/c85414b41675eeb1f8675785ca55c6ee5e57e2c6.jpeg)

 ![Ekran Alıntısı](https://global.discourse-cdn.com/meta/original/4X/0/1/4/014b10c244544c540ac7f5763c4c9afc952e762b.png)

 ![rt](https://global.discourse-cdn.com/meta/original/4X/6/7/4/674372591780b86b12e73b1dd967f44fde55ea0f.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 20, 2024, 8:03am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/441 "2024-03-20T08:03:17Z")

</div>

> [@Ahmed26](#):
>
> Could you please tell me what settings I should choose to make it like in this picture?

Remove routes from this setting:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/9/1/491d574626f089da96adcfaa7339104d8f1e658a.png)

Otherwise they will show as “Tiles”. If you want zero routes as “Tiles” format, remove all of these lines, but you might want to consider Tiles on mobile (in which case keep those with `*-mobile`).

---

<div class="post-metadata">

### Author: ![Ahmed26](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed26/32/347069_2.png) [@Ahmed26](https://meta.discourse.org/u/Ahmed26)
#### Post date: [March 20, 2024, 8:29am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/442 "2024-03-20T08:29:04Z")

</div>

It’s perfect now, thank you for that 🙏

---

<div class="post-metadata">

### Author: ![Ahmed26](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed26/32/347069_2.png) [@Ahmed26](https://meta.discourse.org/u/Ahmed26)
#### Post date: [March 20, 2024, 8:39am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/443 "2024-03-20T08:39:06Z")

</div>

Fonts come out too much, how do I reduce the words?

 ![yyyyyy](https://global.discourse-cdn.com/meta/original/4X/0/f/0/0f080977b0b95f582e3f2553977b3eb2e38c6fc3.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 20, 2024, 9:26am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/444 "2024-03-20T09:26:43Z")

</div>

There’s a setting in the accompanying sidecar plugin (listed in the OP):

![image](https://global.discourse-cdn.com/meta/original/4X/a/a/3/aa3ad111c62d36081c070c171dfc24c0dc193eee.png)

But without the plugin you might want to try the native settings:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/1/4/414e0162b0822d3194e6546e4d00272210fff87a.png)

I haven’t looked at this in a while! 😅

---

<div class="post-metadata">

### Author: ![Ahmed26](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed26/32/347069_2.png) [@Ahmed26](https://meta.discourse.org/u/Ahmed26)
#### Post date: [March 20, 2024, 11:17am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/445 "2024-03-20T11:17:46Z")

</div>

I’m playing with the settings you mentioned, but it doesn’t work.

Interestingly, there are too few summaries on one topic and too much on the other.

The character must be within a certain character limit.

 ![88](https://global.discourse-cdn.com/meta/original/4X/0/9/6/0966921be7594981ea0b74a63a85bd97a6157891.png)  
 ![89](https://global.discourse-cdn.com/meta/original/4X/c/f/f/cff76936f136eaf1fbcff33bb45cf8ef18464f2f.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 20, 2024, 11:20am UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/446 "2024-03-20T11:20:56Z")

</div>

Install the sidecar plugin, use that setting.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [March 20, 2024, 12:24pm UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/447 "2024-03-20T12:24:45Z")

</div>

> [@Ahmed26](#):
>
> I’m playing with the settings you mentioned, but it doesn’t work.

I would guess that you have to fire a post rebake to redo the topic summary.

[Previous page](https://meta.discourse.org/t/topic-list-previews-tlp/209973.md?page=21)

[Next page](https://meta.discourse.org/t/topic-list-previews-tlp/209973.md?page=23)
