Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17461 Improve visibility of forum posts in vetting view #3675

Merged
merged 1 commit into from
May 2, 2024

Conversation

btangmu
Copy link
Member

@btangmu btangmu commented May 1, 2024

-New icons in the Comparison (English) column: 💬 followed by question mark or period

-💬? means: This item has forum posts, some of which are open

-💬. means: This item has forum posts, all of which are closed

-New class SurveyForum.PathForumStatus

-New method appendForumStatus in cldrTable.mjs

-Fix a few Java compiler warnings

CLDR-17461

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

-New icons in the Comparison (English) column: 💬 followed by question mark or period

-💬? means: This item has forum posts, some of which are open

-💬. means: This item has forum posts, all of which are closed

-New class SurveyForum.PathForumStatus

-New method appendForumStatus in cldrTable.mjs

-Fix a few Java compiler warnings
@btangmu btangmu self-assigned this May 1, 2024
@btangmu btangmu requested review from srl295, macchiati and AEApple May 1, 2024 17:49
Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but SRL should review.

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the UI was hooked in! Looks fine, on the SQL perf it's the round trip that's a challenge. So probably the two queries could be a single one that would be just as fast. Also this is a separate query per XPath which will be expensive. Cheaper would probably be something like "list of xpaths in this locale and a count of posts and open posts" and just invalidate it if someone calls the post endpoint.

Example - this is on production

SET SESSION TRANSACTION READ ONLY; -- safety first!
select xpath, count(*), max(is_open) from cldr_forum_posts where loc='fr' group by xpath;

...

| 698928 |        8 |            0 |
| 698931 |        3 |            0 |
| 698932 |        4 |            0 |
| 698936 |        3 |            0 |
| 699740 |        2 |            1 |
| 699761 |        4 |            0 |
| 699771 |        1 |            0 |
| 699772 |        7 |            1 |
| 699778 |        8 |            1 |
+--------+----------+--------------+
886 rows in set (0.00 sec)

even the entire set is pretty speedy

| zu         | 686547 |        2 |            0 |
| zu         | 698722 |        2 |            0 |
| zu         | 698781 |        2 |            0 |
| zu         | 698863 |        2 |            0 |
+------------+--------+----------+--------------+
51444 rows in set (0.65 sec)

but each sql connection for each xpath adds overhead.

@macchiati
Copy link
Member

macchiati commented May 1, 2024 via email

@AEApple
Copy link
Contributor

AEApple commented May 2, 2024

Where can I preview this? I tried in staging but I didn't see an icon for some closed forum posts. Do I need to check smoke test?

@btangmu btangmu merged commit dd4a0bd into unicode-org:main May 2, 2024
11 checks passed
@btangmu btangmu deleted the t17461_b branch May 2, 2024 15:11
@btangmu
Copy link
Member Author

btangmu commented May 2, 2024

I went ahead and merged this. @AEApple within an hour it should be running on cldr-smoke so you can test and evaluate the interface. @srl295 and @macchiati I agree the db access probably needs optimization, though I was considering first to measure hot spots and confirm that it's a hot spot. A cache for each locale may be expensive in terms of memory, though it's good that only the paths with posts need caching...

@srl295
Copy link
Member

srl295 commented May 2, 2024

I went ahead and merged this. @AEApple within an hour it should be running on cldr-smoke so you can test and evaluate the interface. @srl295 and @macchiati I agree the db access probably needs optimization, though I was considering first to measure hot spots and confirm that it's a hot spot. A cache for each locale may be expensive in terms of memory, though it's good that only the paths with posts need caching...

Thousands of sql calls is also expensive.

But 100% on moving forward and improve later

@macchiati
Copy link
Member

macchiati commented May 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants