Age | Commit message (Collapse) | Author | Files | Lines |
|
- Merged polls table into threads table. Not much of a
storage/performance difference, and it's a bit simpler this way.
- Merged DB::Polls into DB::Discussions. Mainly because of the above
change in DB structure.
- Add option to remove an existing poll.
- Allow preview and recast to be changed without deleting the votes
- Set preview option by default. Because personal preferences. :)
- Minor form validation differences
|
|
|
|
'<> ANY' doesn't work that way. NOT EXISTS() is also pretty fast and
does what we want.
|
|
I don't know why I didn't apply this one before, I did make this change
when benchmarking the fulltext search queries and with the introduction
of the bb_tsvector() function this change pretty much always improves
performance.
|
|
An index on threads_posts.date was necessary to speed up some very
common "recent posts" queries on both the homepage and the thread index.
Postgres thought that the same index could be used to speed up the
full-text search (because it's ordered by date, after all), but that
completely killed performance. That was solved with a bb_tsvector()
wrapper to tell the query planner that not using the full-text index is
incredibly show, which in turn improved the search performance beyond
what it was.
Many thread-related queries are still somewhat slow, but that seems to
be a limitation in the schema. I'll just keep monitoring to see if
that's worth fixing in the future.
Interestingly, dbThreadCount() needs to use a sequential scan, but it's
still remarkably fast.
|
|
|
|
This basically makes VNDB browsable again, but editing entries is still
broken.
I split off the get-old-revision functionality from the db*Get() methods
into db*GetRev(). This split makes sense even with the old SQL schema:
db*Get() had to special-case some joins/filters when fetching an older
revision, and none of the other filters would work in that case. This
split does cause some code duplication in that all db*GetRev() methods
look very much alike, and that the columns they fetch is almost
identical to the db*Get() methods. Not sure yet how to avoid the
duplication elegantly.
I didn't do a whole lot of query optimization yet (most issues require
extra indices, I'll investigate later which indices will make a big
difference), but I did fix some low hanging fruit whenever I encountered
something.
I don't think I've worsened anything, performance-wise.
|
|
|
|
And also fix strip_bb_tags() to be case-insensitive and fix a bug in
converting the query into a tsquery.
|
|
Inspired by wakaranai's implementation at
https://github.com/morkt/vndb/commit/b852c87ad145fdaaa09c79b6378dd819b46f7e87
This version is different in a number of aspects:
- Separate search functions for title search and fulltext post search.
Perhaps not the most convenient option, but the downside of a combined
search is that if the query matches the threads' title, then all of
the posts in that thread will show up in the results. This didn't seem
very useful.
- Sorting is based purely on post date. Rank-based sort is slow without
a separate caching column, and in my opinion not all that useful.
Implementation differences:
- Integrated in the existing DB::Discussions functions, so less code to
maintain and more code reuse.
- No separate caching column for the tsvector, a functional index is
used instead. This is a bit slower (index results need to be
re-checked against the actual messages, hence the slowdown), but has
the advantage of smaller database dumps and less complexity in
updating the cache.
Things to fix or look at:
- Highlighting of the search query in message contents.
- Allow or-style query matching
|
|
The char(2) solution is both inefficient and ugly. Also needed to be
careful with handling the extra space that Postgres would automatically
add to single-character types.
|
|
The current setup should be able to handle all kinds of notifications,
though only PMs are implemented at this point. More to come.
|
|
Damn, so many bugs...
This one was introduced in 9613533da2c58af3c64e3bd4ed7b92b22ffd442f
|
|
The ORDER BY was previously specified using an 'order' argument, which
would then be directly inserted into the query. The new method is the
same as what I used for the public API: two 'sort' and 'reverse'
arguments. This should be less error-prone and more readable.
This changes quite a lot of code, so I hope I haven't forgotten to
update something along the way.
|
|
Instead of displaying the total number of threads. Posts are marked as
read when the thread is opened.
|
|
Everything still seems to be working fine so far.
|
|
|
|
-- Removed unneeded export of previously deleted subroutine dbPostCheckDouble
|
|
-- Removed dbPostCheckDouble
-- Added more filters to dbPostGet to serve similar purpose
|
|
-- Created a subroutine to check for any recent posts made by a user
-- Added double-post checking and error messages to the form
handler & html generator
|
|
|
|
|
|
Conflicts:
lib/VNDB/DB/Discussions.pm
util/updates/update_2.3.sql
|
|
Which is a more accurate description, and doesn't confuse with the
tagging system.
Note than even all internal uses of the word 'tag' have been replaced,
as I'm not a huge fan of different terminology in the code and UI. This
update might break some things related to the discussion board.
|
|
|
|
DB/{Votes,VNList,WishList}.pm into ULists.pm
|
|
|
|
|
|
Most of the code, or at least the design, was stolen from 1.X, as
those functions were fine.
Links to these forms is still pending...
|
|
|
|
Not sure about the style, but at least it works.
Thread page is now pretty much finished as well, yay!
|
|
|