News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Extend Character Count for Subject Line

Started by jawad96, October 22, 2014, 07:03:54 AM

Previous topic - Next topic

margarett

This
http://stackoverflow.com/questions/7755629/varchar255-vs-tinytext-tinyblob-and-varchar65535-vs-blob-text
Kinda sums it up.

In true honesty, I don't see why can't it just be changed to VARCHAR(something) and do the edits I mentioned above to Post.template.php and Post.php (or other affected files)... But I'm far from a SQL expert :P
Yes, there's an implicit overhead and, attached to it, performance penalty. In most setups out there, I seriously doubt this would be noticeable...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vince S

oh, OK jawad - I took that as a "process" comment; ie you didn't know what it did to get you the "worked for me" outcome.

So dead in the water I guess as it kinda has the death stare from anyone that has a proper grasp of what is involved in doing what we dweebs think looks like a snack and would be damn handy. That is why we are dweebs, we don't know!

And this dweeb is an edge dweller to boot - I have always loved the maxim that "if you're not living on the edge you're taking up too much room" so it is pretty comfortable out here.

And, from the edge, I would like to lob this grenade back into the middle, read the few posts following this one and see what y'all reckon:

http://www.simplemachines.org/community/index.php?topic=359405.msg2450415#msg2450415

Sounds like there might be an answer, at least from RC2 days - Waddya reckon punks / punkettes, anyone keen enough to try?
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

jawad96

Hi Kindred,

It is going to be usually for similar thread names from the Warrior Forum, i.e

[Investors Pay Attention] Real Estate Millionaire Shows You The Secrets To UNLIMITED Cash Buyers!

Clickbank officially recommend us Warrior App Maker! Just One Click To Get Huge Profits From Pytch!

Thanks

margarett

Quote from: Vince S on October 23, 2014, 07:05:13 AM
And, from the edge, I would like to lob this grenade back into the middle, read the few posts following this one and see what y'all reckon:
http://www.simplemachines.org/community/index.php?topic=359405.msg2450415#msg2450415
Sounds like there might be an answer, at least from RC2 days - Waddya reckon punks / punkettes, anyone keen enough to try?
Which is, if you notice, pretty much the same I said some posts ago :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vince S

yep, I did notice. I expected a bit of well deserved basking in the warm afterglow of recreated brilliance. Good to see it.

But it is the guys with the big messy code axes that can despatch an afterglow with the haste of a well streamed demon's lamp-light o'er that dreamy shadow I am waiting to hear from.....
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

margarett

LOL :P

@jawad96: that's a 2-lines subject that you will *NOT* be able to achieve...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Vince S

I think jawad was suggesting two examples of topics - which MS Word assures me are 97 and 99 characters long respectively.

With the aid of MS Word reality checking I have revised my own desires down from 150; 120 would be beautiful overkill and 100 would be just fine, even still losing the 4 "RE: " characters.
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Steve

Quote from: margarett on October 23, 2014, 08:06:39 AM
@jawad96: that's a 2-lines subject that you will *NOT* be able to achieve...

While not a two-line topic wouldn't this essentially achieve the same result?

http://custom.simplemachines.org/mods/index.php?mod=3012
DO NOT pm me for support!

margarett

Nice catch. I'm not sure if the description is "searcheable" but it could really solve the OP's issue ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Steve

Thanks! :D

I haven't tested it yet as it wants a lot of manual edits on my forum and I've been too lazy to do it. :P
DO NOT pm me for support!

Arantor

QuoteIn true honesty, I don't see why can't it just be changed to VARCHAR(something)

It already is a VARCHAR, it used to be TINYTEXT but that screwed with performance even worse.

*shrug* I thought I already explained the details here, that's you're dealing with changes to templates AND source AND database and that the changes to the database will have performance quirks that will slow everything down.

And the reason it is varchar(255) is related to how MySQL internally counts the size of fields (which is more to do with bytes than characters)

But I'm pretty used to not being listened to at this point. Fairly used to explaining that there are reasons for things being so and being ignored by people who are fairly sure they know better than I do. Makes me wonder why I keep hanging around here, really.

margarett

Don't do that, you know it's not true ;) Not in my case, at least :P

Obviously I didn't meant for that change to be core. But if the users in need accept that they will get a performance penalty, it might be a possibility, just saying ;)
Bottom line is: it's not recommended, but your forum will not explode ;D
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor


Vince S

The axe falleth ...
Quote from: Arantor on October 23, 2014, 11:24:12 AMI thought I already explained the details here, that's you're dealing with changes to templates AND source AND database and that the changes to the database will have performance quirks that will slow everything down.

but oh - the wretchedness ....
Quote from: Arantor on October 23, 2014, 11:24:12 AMI'm pretty used to not being listened to at this point. Fairly used to explaining that there are reasons for things being so and being ignored by people who are fairly sure they know better than I do. Makes me wonder why I keep hanging around here, really.

For those of us not all hung up in the Shakespearean futility of it all, any chance of informing we mere mortals in a way we can make sensible decisions?

We all agree this is not a life and death issue. Hara-Kiri is not on the table. In fact it is so unimportant in the scheme of things that we are unlikely to even crack open a pack of band-aids, let alone get the Savlon out. So no legends need to fall. The sword can remain in its scabbard and un-dived on, and absolutely no puppies are to be harmed. Egos shouldn't even blush, let alone contemplate picking up a bruise or taking on a battered persona for the benefit of their long-suffering owners.

So, if one goes and does the things intimated by the as-yet-unglowed margarett and laid out in more detail by those of the interminable era of pondering the intimacies of RC2, what happens? I mean what exactly? or at least the loose version of "exactly".

From this discussion thread, it seems adopting a 100 character limit might be a no-brainer (but check how many brains we have here...!), and the RC2 era discussion suggests even bigger limits would be OK. So, the first important question is:

1) Is increasing character length likely to actually break something? To me, "break" means things like Announce Topic doesn't work as expected, or important errors are generated or infinite loops happen to be timed out of. "Not explode" is a manifestly inadequate way to describe this outcome, unless this is exactly what it means....?

then

2) What does "performance hit" mean? Are we talking 0.03secs larger processing time? or a 0.1 sec increase to page loading? or a 0.001sec calc time increase multiplied by 20,000 calcs per second?

Do tell. Thank you
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Steve

[OT]Dude, if you're not a writer, you missed your calling.[/OT]
DO NOT pm me for support!

margarett

1) not likely, but possible. Some layout issues and some possible overlooked functions (which I can't remember one right now :P )

2) The link I posted from SO should more or less clear that. If you keep VARCHAR 255, there are no differences (sou you will be just changing the code I pointed out. You might loose some characters if using strange characters or something like that (but thats's also unlikely if you keep your distance from the 255 limit ;) )
If you increase the VARCHAR size, you earn a byte of overhead (for the size) plus the obvious increase in the data size. For other technicalities, going to a TEXT field type is slower in access. Not more data, a slower way to access it. I have no idea how to quantify that.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Except increasing beyond varchar 255 does not behave consistently depending on character set, collation and other server configuration details with the way SMF uses it. And there are other hidden gotchas in MySQL around row size too.

And in fact, the reason TEXT is slow (forces filesort) can become a thing in varchar cases too if you go beyond 255 because of how MySQL determines whether or not to perform its own sorting.

Can I give you metrics? No, because it's instance specific. But consider the fact of where the subject is used, in both retrieved and sorted cases, and that there is guaranteed to be an increase time everywhere...

Then again, given the number of other performance bottlenecks I found over the years, *shrug*

Advertisement: