You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On huge boards or boards with low ressources the parsing that is done for every post everytime it is loading takes quite a lot time.
So the idea was to reduce this load to a minimum with parsing the posts one time on post submit and store the parsed version in the database.
This would make it permanent, wich would lead so some problems (addressed here: https://www.phpbb.com/community/viewtopic.php?p=13936311#p13936311) that should be reduced to a minimum to keep the data consistent.
The text was updated successfully, but these errors were encountered:
You could actually, instead of modifying the post, introduce a new table "phpbb_mentions" for this, linking the mentioned user_ids and the post_ids (and/or topic_ids).
Then instead of generating a whole list each time of displaying, you can simply check for the post IDs you need in that table and fetch only the necessary user information on display. It should be possible to integrate this on the SQL you already need for fetching the data anyways, since you can always simply fetch all posts displayed at once.
This will not completely solve the problem of changed username (since during replace, you won't recognize the old username which is still in the post anymore), but it will make it possible to remove all data of this extension from the database easily. If you want to keep linking the old username, you will need to store the old username as well to be able to replace it.
Another solution of the second problem would be reparsing all posts, which is not really desirable.
Interesting idea too.then I would possibly just store the important data from the get_mentioned_users() function, so type, start and length and the user_id, so I could simply query the needed data for the parser.
I still need to parse then, but it would be much faster, I guess (?)
The problem with changed usernames is not a real problem for me. I don't think it is needed to come up with a solution there. As I've already posted in the topic on phpbb.com, it's the same with quotes by phpBB, wich aren't handled different, so the old name wouldn't match when it is changed.
Or wait. if I store the user_id, I will get the correct mention, won't I?
You will get the correct new username, but you will loose all old mentions when the name changes, because you will search for the new name which can't be found in old posts.
I don't think there is a best solution for that problem, at least removing the data will work correctly.
On huge boards or boards with low ressources the parsing that is done for every post everytime it is loading takes quite a lot time.
So the idea was to reduce this load to a minimum with parsing the posts one time on post submit and store the parsed version in the database.
This would make it permanent, wich would lead so some problems (addressed here: https://www.phpbb.com/community/viewtopic.php?p=13936311#p13936311) that should be reduced to a minimum to keep the data consistent.
The text was updated successfully, but these errors were encountered: