this post was submitted on 18 Aug 2023
1 points (100.0% liked)

Lemmy Project Priorities Observations

5 readers
1 users here now

I've raised my voice loudly on meta communities, github, and created new [email protected] and [email protected] communities.

I feel like the performance problems are being ignored for over 30 days when there are a half-dozen solutions that could be coded in 5 to 10 hours of labor by one person.

I've been developing client/server messaging apps professionally since 1984, and I firmly believe that Lemmy is currently suffering from a lack of testing by the developers and lack of concern for data loss. A basic e-mail MTA in 1993 would send a "did not deliver" message back to message sender, but Lemmy just drops delivery and there is no mention of this in the release notes//introduction on GitHub. I also find that the Lemmy developers do not like to "eat their own dog food" and actually use Lemmy's communities to discuss the ongoing development and priorities of Lemmy coding. They are not testing the code and sampling the data very much, and I am posting here, using Lemmy code, as part of my personal testing! I spent over 100 hours in June 2023 testing Lemmy technical problems, especially with performance and lost data delivery.

I'll toss it into this echo chamber.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)

For post listing, these are the three that aren't simple to grasp:

      SortType::Active => query
        .then_order_by(post_aggregates::hot_rank_active.desc())
        .then_order_by(post_aggregates::published.desc()),
      SortType::Hot => query
        .then_order_by(post_aggregates::hot_rank.desc())
        .then_order_by(post_aggregates::published.desc()),
      SortType::Controversial => query.then_order_by(post_aggregates::controversy_rank.desc()),
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (2 children)
    hot_rank: 1728,
    hot_rank_active: 1728,

  -- Note: 1728 is the result of the hot_rank function, with a score of 1, posted now
  -- hot_rank = 10000*log10(1 + 3)/Power(2, 1.8)
[–] [email protected] 1 points 1 year ago

Difference between hot_rank and hot_rank_active

SET hot_rank = hot_rank(a.score, a.published),
        hot_rank_active = hot_rank(a.score, a.newest_comment_time_necro)"

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)
lemmy@lemmy_alpha LOG:  duration: 50.220 ms  execute : WITH batch AS (SELECT a.id
	               FROM post_aggregates a
	               WHERE a.published > $1 AND (a.hot_rank != 0 OR a.hot_rank_active != 0)
	               ORDER BY a.published
	               LIMIT $2
	               FOR UPDATE SKIP LOCKED)
	         UPDATE post_aggregates a SET hot_rank = hot_rank(a.score, a.published),
	         hot_rank_active = hot_rank(a.score, a.newest_comment_time_necro)
	             FROM batch WHERE a.id = batch.id RETURNING a.published;
	    
2023-08-18 09:00:34.578 MST [1877420] lemmy@lemmy_alpha DETAIL: 
 parameters: $1 = '2023-08-16 23:40:31.149267', $2 = '1000'

[–] [email protected] 1 points 1 year ago
CREATE FUNCTION public.hot_rank(score numeric, published timestamp without time zone) RETURNS integer
    LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE
    AS $$
DECLARE
    hours_diff numeric := EXTRACT(EPOCH FROM (timezone('utc', now()) - published)) / 3600;
BEGIN
    IF (hours_diff > 0) THEN
        RETURN floor(10000 * log(greatest (1, score + 3)) / power((hours_diff + 2), 1.8))::integer;
    ELSE
        RETURN 0;
    END IF;
END;
$$;