Pokey
Pokey
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Nwrs, thanks for your help
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
This is more complex than I thought
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Ah right
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Yes
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
How does the hub store a connection list if it is transient?
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Ah ok
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Unlike a Controller (which IIRC is Scoped) is the hub itself a Singleton then?
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Hm so singleton might be best then with ID
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
And how about Context.Items for simple data, is that viable or not?
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
Sure
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
This isn't users, it's autonomous
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
That would be fine, I'd like it per connection, they would have to set up again on reconnection
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
I stuck this on Reddit too and someone said Context.Items but not 100% certain if that would work with polling
88 replies
CC#
Created by Pokey on 10/5/2024 in #help
What's the correct way to handle state in a SignalR Hub?
That handles with but not state data
88 replies
CC#
Created by Pokey on 7/30/2024 in #help
Change ASP.NET response encoding from UTF-8 to ISO-8859-1?
Unfortunetely not, that answer is for .NET Framework
3 replies
CC#
Created by Pokey on 10/7/2023 in #help
❔ EF Core LINQ - Many to Many Search with && and ||
The final paginated query is derived from this query with one additional filter + the SkipTake
42 replies
CC#
Created by Pokey on 10/7/2023 in #help
❔ EF Core LINQ - Many to Many Search with && and ||
I have a feeling the fact I do a .Skip().Take() for pagination for the main page query helps a lot, but this query is not paginated (gets total result count) and basically kills everything
42 replies
CC#
Created by Pokey on 10/7/2023 in #help
❔ EF Core LINQ - Many to Many Search with && and ||
Yes, the answer is yes it has helped a lot. For some reason though this SQL is produced when I just do a .Count()
SELECT
COUNT(*)::INT
FROM
"Files" AS f
WHERE
EXISTS (
SELECT 1 FROM
"FileLabelMappings" AS f0
INNER JOIN
"Labels" AS l
ON
f0."LabelId" = l."Id"
WHERE
(f."Id" = f0."FileId")
AND NOT
l."Id" = ANY ('{13573,23371,5417,12481,9712,43931,3390,63396,32105,13571,20927,14431,15360,16919}')
AND
((l."Id" = ANY ('{13573,23371,5417,12481,9712,43931,3390,63396,32105,13571,20927,14431,15360,16919}') IS NOT NULL)))
)
SELECT
COUNT(*)::INT
FROM
"Files" AS f
WHERE
EXISTS (
SELECT 1 FROM
"FileLabelMappings" AS f0
INNER JOIN
"Labels" AS l
ON
f0."LabelId" = l."Id"
WHERE
(f."Id" = f0."FileId")
AND NOT
l."Id" = ANY ('{13573,23371,5417,12481,9712,43931,3390,63396,32105,13571,20927,14431,15360,16919}')
AND
((l."Id" = ANY ('{13573,23371,5417,12481,9712,43931,3390,63396,32105,13571,20927,14431,15360,16919}') IS NOT NULL)))
)
Which takes 8-15 seconds to execute and those strings looks cursed AF
42 replies
CC#
Created by Pokey on 10/7/2023 in #help
❔ EF Core LINQ - Many to Many Search with && and ||
... Mostly
42 replies
CC#
Created by Pokey on 10/7/2023 in #help
❔ EF Core LINQ - Many to Many Search with && and ||
Thank you so much @ZZZZZZZZZZZZZZZZZZZZZZZZZ that works extremely well. My old buggy search took 8 seconds to process 430K rows. This takes 700ms! Hopefully that actually is all I needed, and I don't need to come back with a caveat
42 replies