Tech Note: Much Faster Tag Autocompletion for LGF Pages

Need for speed
LGF • Views: 24,150

One of the features we have for LGF Pages is the ability to enter tags for each Page you post, with an “auto-complete” feature that suggests tags as you type, based on the ones you’ve previously used. But I’ve been noticing that this feature hasn’t been performing well, since I switched to a method that made a database request for each keypress, to get the suggested tags.

So I spent some time on this again today, and now things are much, much speedier — almost instantaneous, in fact, since the entire list of your previous tags is now kept in memory. The LGF Pages posting window and popup editing dialog now load the entire list of tags asynchronously at startup, so it doesn’t slow anything down no matter how large the list is.

If you’re editing an already published Page, you may notice that the existing tags take a few moments to appear, especially if you’ve created a lot of different tags already. But since the tags are being loaded in the background, you can use any of the other features in the editing window even before they show up.

And that’s our software improvement of the day.

Jump to bottom

61 comments
1 thedopefishlives  Sat, Jan 18, 2014 2:40:59pm

Mmm, asynchronous data. Breakfast of champions.

2 AlexRogan  Sat, Jan 18, 2014 2:42:53pm

re: #1 thedopefishlives

Mmm, asynchronous data. Breakfast of champions.

Yes, but do the bits of data stay crunchy in milk?

/

3 wrenchwench  Sat, Jan 18, 2014 2:43:05pm

The tag suggester thing is very handy, but some of the suggestions are useless for searching for related articles. Good ones still sometimes need to be *gasp* typed manually.

I’ll go test-drive the improvements…

4 thedopefishlives  Sat, Jan 18, 2014 2:43:59pm

re: #2 AlexRogan

Yes, but do the bits of data stay crunchy in milk?

/

That’s the whole point of packets. They’re like little capsules of yum protecting the data.

5 Charles Johnson  Sat, Jan 18, 2014 2:48:59pm

Here’s the actual code that asynchronously loads the tags by calling a PHP script on the server, then sets up the input area with the tag autocomplete plugin:

$.ajax({
	url: '/weblog/lgf-apagetags.php',
	dataType: 'json'
}).done(function(theTags) {
	$('#editTags').tagsInput({
		autocomplete_url: theTags,
		height: '82px',
		width: '588px',
		unique: true,
		defaultText: '',
		autocomplete: {
			selectFirst: true,
			width: 150,
			max: 12,
			scrollHeight: 200
		}
	});
});
6 Charles Johnson  Sat, Jan 18, 2014 2:53:24pm

re: #3 wrenchwench

The tag suggester thing is very handy, but some of the suggestions are useless for searching for related articles. Good ones still sometimes need to be *gasp* typed manually.

I’ll go test-drive the improvements…

Yeah, the ‘Suggest Tags’ feature is useful but comes up with a lot of nonsensical stuff too.

That’s not what this improvement is for, though — this makes the autocomplete when typing in new tags much quicker.

7 RealityBasedSteve  Sat, Jan 18, 2014 3:02:14pm

LGF is busy crawling our tags and keeping a list. Charles is plotting to become the new evil overlord. Woes is us!!!!

RBS

8 thedopefishlives  Sat, Jan 18, 2014 3:04:02pm

re: #7 RealityBasedSteve

LGF is busy crawling our tags and keeping a list. Charles is plotting to become the new evil overlord. Woes is us!!!!

RBS

Wait, “plotting to become”? Have you not been paying attention all these years? The Lizard Lair under Denver International Airport has been world headquarters for all manner of nefarious three-letter-acronym’d organizations for years.

9 wrenchwench  Sat, Jan 18, 2014 3:13:12pm

re: #6 Charles Johnson

Yeah, the ‘Suggest Tags’ feature is useful but comes up with a lot of nonsensical stuff too.

That’s not what this improvement is for, though — this makes the autocomplete when typing in new tags much quicker.

It worked great. Typing one letter instantly made a drop down list of my favorite tags.

10 sattv4u2  Sat, Jan 18, 2014 3:14:34pm

re: #1 thedopefishlives

Mmm, asynchronous data. Breakfast of champions.

re: #2 AlexRogan

Yes, but do the bits of data stay crunchy in milk?

/

banana,,,,I need a banana innit!!!

11 Charles Johnson  Sat, Jan 18, 2014 3:16:43pm

re: #9 wrenchwench

It worked great. Typing one letter instantly made a drop down list of my favorite tags.

And they’re sorted so that the ones you use most frequently appear at the top of the list.

12 wrenchwench  Sat, Jan 18, 2014 3:18:48pm

Gay Man Says Catholic Church Ousted Him

Is there a way to embed the video there? If there is, would that be like copying an entire article, since the video is all there is to that story?

13 wrenchwench  Sat, Jan 18, 2014 3:19:11pm

re: #11 Charles Johnson

And they’re sorted so that the ones you use most frequently appear at the top of the list.

Making its use even speedier!

14 Justanotherhuman  Sat, Jan 18, 2014 3:28:12pm

Sorry for those who live there.

Bitterly cold weather returning, but don’t call it a ‘polar vortex,’ meteorologists plead

usnews.nbcnews.com

It’s supposed to be 61 and sunny here on Monday. We still haven’t had any snow in this area, but we’ve had “snow showers” in March before, and we still have to get through Feb, also.

15 thedopefishlives  Sat, Jan 18, 2014 3:28:53pm

re: #14 Justanotherhuman

Sorry for those who live there.

Bitterly cold weather returning, but don’t call it a ‘polar vortex,’ meteorologists plead

usnews.nbcnews.com

It’s supposed to be 61 and sunny here on Monday. We still haven’t had any snow in this area, but we’ve had “snow showers” in March before, and we still have to get through Feb, also.

It’s alright. It was a choice. I’ll survive it.

16 sattv4u2  Sat, Jan 18, 2014 3:30:18pm

re: #14 Justanotherhuman

Bitterly cold weather returning

hey. it was cold here today! Never got above 48

Hell, I couldn’t even go play golf !!!!

17 wrenchwench  Sat, Jan 18, 2014 3:36:02pm
18 Single-handed sailor  Sat, Jan 18, 2014 3:37:31pm

It’s a nice, sunny, 71F 28% here, east of the East Bay hills. We’ve had 0.00” of rain since before Thanksgiving. My old weather station had a broken rain gauge for the past 2 years so I bought a new one, I think the drought might be my fault./

19 sattv4u2  Sat, Jan 18, 2014 3:37:52pm

re: #15 thedopefishlives

It’s alright. It was a choice. I’ll survive it.

I did

For 45 years.

Never again

I’ll visit in winter (relatives and friends still all over the Boston area,,,,and I still go skiing in New Hampshire / Vermont )

But living there again??? Nuh uh!!

20 Justanotherhuman  Sat, Jan 18, 2014 3:39:13pm

re: #15 thedopefishlives

It’s alright. It was a choice. I’ll survive it.

Yeah, but it’s also why they have snowbirds. We can’t figure out why Canadians want to go to the beaches down here in March. They think an ocean temp of 50 deg is great and they don’t have to go all the way to FL which is more expensive. The merchants and real estate agents don’t mind making money, either, so it’s a win-win.

visitmyrtlebeach.com

21 Archangelus  Sat, Jan 18, 2014 3:39:29pm

I’ll trade your winters over there if you take my summers over here!
/KindaItGetsInsaneHotHere

22 sattv4u2  Sat, Jan 18, 2014 3:40:40pm

re: #18 Single-handed sailor

It’s a nice, sunny, 71F 28% here, east of the East Bay hills. We’ve had 0.00” of rain since before Thanksgiving. My old weather station had a broken rain gauge for the past 2 years so I bought a new one, I think the drought might be my fault./

Thats whats nice about here (Atlanta)

It gets cold,,, but not TOO cold. And we get enough rain that droughts aren’t generally an issue (though we did have a partial outdoor watering ban for about 18 months 3 - 4 years ago

23 klys  Sat, Jan 18, 2014 3:41:05pm

re: #18 Single-handed sailor

It’s a nice, sunny, 71F 28% here, east of the East Bay hills. We’ve had 0.00” of rain since before Thanksgiving. My old weather station had a broken rain gauge for the past 2 years so I bought a new one, I think the drought might be my fault./

Honestly we should just turn off the heat and open the doors.

Which is disgusting.

24 thedopefishlives  Sat, Jan 18, 2014 3:41:23pm

re: #19 sattv4u2

It’s alright. It was a choice. >I’ll survive it.

I did

For 45 years.

Never again

I’ll visit in winter (relatives and friends still all over the Boston area,,,,and I still go skiing in New Hampshire / Vermont )

But living there again??? Nuh uh!!

The weirdest thing that I had to adjust to when I moved to Minnesota was the lakes all freezing over. I lived in a lakeside cabin for my first 3 years here, and I would take walks across the lake on sunny days. Coming from a place that has a lot of rivers (that rarely freeze solid during winters, no less), walking on the water seemed more like a miracle than a routine occurrence.

25 Archangelus  Sat, Jan 18, 2014 3:42:30pm

BTW, whenever folks mention the Polar Vortex, this is what should be coming to mind nowadays:

You know it’s only a matter of time…

26 sattv4u2  Sat, Jan 18, 2014 3:42:32pm

re: #20 Justanotherhuman

Yeah, but it’s also why they have snowbirds. We can’t figure out why Canadians want to go to the beaches down here in March. They think an ocean temp of 50 deg is great and they don’t have to go all the way to FL which is more expensive. The merchants and real estate agents don’t mind making money, either, so it’s a win-win.

visitmyrtlebeach.com

I didn’t know you are in/ around Myrtle

I have a place at Pawleys, and I’ll be in Myrtle the 2nd week of February meeting a friend who has a place there and golfing for a few days

27 sattv4u2  Sat, Jan 18, 2014 3:43:50pm

re: #24 thedopefishlives

The weirdest thing that I had to adjust to when I moved to Minnesota was the lakes all freezing over. I lived in a lakeside cabin for my first 3 years here, and I would take walks across the lake on sunny days. Coming from a place that has a lot of rivers (that rarely freeze solid during winters, no less), walking on the water seemed more like a miracle than a routine occurrence.

Yeah. DECADES ago we had a house in the New Hampshire mountains we used for skiing. The lake we were on would freeze also. get up at dawn to get ready to go ski for the day and all these cars/ pck-ups would already be out on the lake with ice fishermen

28 PhillyPretzel  Sat, Jan 18, 2014 3:45:34pm

After Monday the mercury starts dropping, again. wunderground.com

29 Justanotherhuman  Sat, Jan 18, 2014 3:45:52pm

re: #22 sattv4u2

Thats whats nice about here (Atlanta)

It gets cold,,, but not TOO cold. And we get enough rain that droughts aren’t generally an issue (though we did have a partial outdoor watering ban for about 18 months 3 - 4 years ago

I don’t like the hot, humid summers we have here in NC, although last year was not too bad. Hardly got into the 90s, but we do get up to 100 frequently enough.

30 thedopefishlives  Sat, Jan 18, 2014 3:46:29pm

re: #27 sattv4u2

Yeah. DECADES ago we had a house in the New Hampshire mountains we used for skiing. The lake we were on would freeze also. get up at dawn to get ready to go ski for the day and all these cars/ pck-ups would already be out on the lake with ice fishermen

The one that always made me laugh was the first snow of the winter when I was in college. Prior to my freshman year, I had never met anyone who had never seen snow before. Then that first winter, the snow came pouring down upon the Indiana plain, and all these freaks were out dancing and laughing and having a riotous time. The natives all looked at each other and shrugged.

31 Justanotherhuman  Sat, Jan 18, 2014 3:48:26pm

re: #26 sattv4u2

I didn’t know you are in/ around Myrtle

I have a place at Pawleys, and I’ll be in Myrtle the 2nd week of February meeting a friend who has a place there and golfing for a few days

Oh, I’m no where near Myrtle, closer to the mtns in NC. And I like Topsail Island in NC over MB any day. Went there when I was younger. You probably like MB because of all the golf courses, I assume? MB is just too commercial for my taste.

32 sattv4u2  Sat, Jan 18, 2014 3:49:01pm

re: #29 Justanotherhuman

I don’t like the hot, humid summers we have here in NC, although last year was not too bad. Hardly got into the 90s, but we do get up to 100 frequently enough.

Yeah. As stated, I’ve spent (parts) of many a summer at Pawleys

And fulltime in Atlanta, where we don’t have the benefit of the ocean breeze

33 sattv4u2  Sat, Jan 18, 2014 3:50:24pm

re: #31 Justanotherhuman

Oh, I’m no where near Myrtle, closer to the mtns in NC. And I like Topsail Island in NC over MB any day. Went there when I was younger. You probably like MB because of all the golf courses, I assume? MB is just too commercial for my taste.

Oh ,, sorry ,,, with you linking to Myrtle I figured you were there

AND no,, I really DON’T like Myrtle, (for the same reason as you). I’m 35-45 minutes south of there,,, a WORLD of difference

34 sattv4u2  Sat, Jan 18, 2014 3:51:28pm

re: #31 Justanotherhuman

re: #33 sattv4u2

Oh ,, sorry ,,, with you linking to Myrtle I figured you were there

AND no,, I really DON’T like Myrtle, (for the same reason as you). I’m 35-45 minutes south of there,,, a WORLD of difference

Yet still close enough to utilize the good about Myrtle

35 sattv4u2  Sat, Jan 18, 2014 3:54:02pm

My ideal,,,,,

Mid June till the Mid September in New England (primarily, Boston)

The rest of the year, Pawleys Island SC

36 PhillyPretzel  Sat, Jan 18, 2014 3:55:21pm

re: #35 sattv4u2

That sounds good. I prefer a high of 60 degrees F. Lows near 30 degrees F.

37 sattv4u2  Sat, Jan 18, 2014 3:57:09pm

And on that note, dinner calls

Followed by a quick cat-nap
THEN
The long quiet drive TO work

38 sattv4u2  Sat, Jan 18, 2014 3:57:15pm

BBL

39 thedopefishlives  Sat, Jan 18, 2014 3:58:53pm

re: #36 PhillyPretzel

That sounds good. I prefer a high of 60 degrees F. Lows near 30 degrees F.

I enjoy the cold, truthfully. It does mean I have to keep a closer eye on my stable of automobiles (and take care lest they rust to pieces), but that’s not all a bad thing.

40 Stanley Sea  Sat, Jan 18, 2014 3:59:25pm
41 Justanotherhuman  Sat, Jan 18, 2014 4:08:20pm

More than 70 whales beached in NZ, being rescued. Photos here on reporter’s twitter.

twitter.com

42 Bubblehead II  Sat, Jan 18, 2014 4:10:16pm

re: #7 RealityBasedSteve

LGF is busy crawling our tags and keeping a list. Charles is plotting to become the new evil overlord. Woes is us!!!!

RBS

You need to get out from under your rock more often. Charles has been an evil overlord for years. Hint: DIA and Zionist overlord checks.

43 Lidane  Sat, Jan 18, 2014 4:10:22pm

re: #10 sattv4u2

banana,,,,I need a banana innit!!!

Youtube Video

44 Justanotherhuman  Sat, Jan 18, 2014 4:28:18pm

A little more Bonnie, please. I’ve been a fan of hers for over 40 yrs.

Bonnie Rait and Tracy Chapman, Jeff Beck and Beth Hart perform “Sweet Home Chicago” in honor of Buddy Guy at the 35th annual Kennedy Center Honors (2012)

Youtube Video

Check out POTUS and FLOTUS jamming…

And a very young Bonnie Raitt from 1972. Those were the days.

Youtube Video

45 Lidane  Sat, Jan 18, 2014 4:36:14pm

Mr. “Spousal Rape Isn’t a Crime” continues his outreach to women:

46 Justanotherhuman  Sat, Jan 18, 2014 4:48:54pm

re: #45 Lidane

Mr. “Spousal Rape Isn’t a Crime” continues his outreach to women:

[Embedded content]

What a sick bastard.

“Black entered politics in the late 1990s after retiring as a military prosecutor. He spoke frequently to media outlets about sexual assault in the military, and called military rape “as predictable as human nature.” “Think of yourself at 25,” Black told a newspaper in 1996. “Wouldn’t you love to have a group of 19-year-old girls under your control, day in, day out?”

47 thedopefishlives  Sat, Jan 18, 2014 4:49:51pm

re: #46 Justanotherhuman

What a sick bastard.

“Black entered politics in the late 1990s after retiring as a military prosecutor. He spoke frequently to media outlets about sexual assault in the military, and called military rape “as predictable as human nature.” “Think of yourself at 25,” Black told a newspaper in 1996. “Wouldn’t you love to have a group of 19-year-old girls under your control, day in, day out?”

That’s a pretty twisted fantasy. I’m not that far removed from 25 and I guarantee I wasn’t dreaming of that. But then, I’m one of those weirdos that likes my women willing.

48 Justanotherhuman  Sat, Jan 18, 2014 4:52:37pm

Aha.

APNewsbreak: Rodman checks into rehab center

bigstory.ap.org

“Dennis Rodman has checked into an undisclosed alcohol rehabilitation center to treat his long-time struggle with alcoholism, his agent says.

“Darren Prince declined on Saturday to say which facility will treat Rodman and how long he will be there. Rodman recently returned to the United States from his latest trip to North Korea.

“He later apologized for comments he made in North Korea about a detained American missionary, saying he had been drinking and was under pressure as he organized an exhibition game there. He also sang “Happy Birthday” to North Korean leader Kim Jong Un at the start of the friendly game.”

No doubt he saw Lil Kim as his drinking buddy, too.

Get better, Dennis. Your life depends on it.

49 freetoken  Sat, Jan 18, 2014 4:56:19pm

Life, how transient
leave only good memories
others remember.

50 Pie-onist Overlord  Sat, Jan 18, 2014 4:59:11pm

re: #45 Lidane

Mr. “Spousal Rape Isn’t a Crime” continues his outreach to women:

[Embedded content]

Pamela blames Dick Black on Teh Islam:

51 PhillyPretzel  Sat, Jan 18, 2014 5:20:25pm

Tony Curtis, Jack Lemmon and Marilyn Monroe in Some Like it Hot. One funny movie. whyy.org

52 Stanley Sea  Sat, Jan 18, 2014 5:21:50pm

re: #49 freetoken

Life, how transient
leave only good memories
others remember.

Nice Haiku.

53 Eclectic Cyborg  Sat, Jan 18, 2014 5:27:52pm

Earlier today I attended the funeral for the former coworker of mine who committed suicide last week.

She was 24.

It was highly emotional and difficult and to top it all off at the end of the ceremony, the mother of the deceased collapsed and had to be rushed to hospital.

Thankfully, she was treated and released, but man, that’s almost too much for that poor family to take in such a short time. My thoughts and prayers are with them tonight.

54 Stanley Sea  Sat, Jan 18, 2014 5:29:05pm

re: #53 Eclectic Cyborg

wow.

55 Kragar  Sat, Jan 18, 2014 5:33:49pm

The party is over. Made it out alive.

56 wrenchwench  Sat, Jan 18, 2014 5:35:38pm

re: #53 Eclectic Cyborg

{{EC}}

57 darthstar  Sat, Jan 18, 2014 5:37:59pm

You know what? Fuck Seinfeld.

There. I said it.

Sorry…just had a brief exchange on Twitter. Time to head out as I’ve been invited to dinner. Have a good evening, all.

58 Kragar  Sat, Jan 18, 2014 5:39:40pm

re: #57 darthstar

You know what? Fuck Seinfeld.

Not even with your dick.
/

59 Bubblehead II  Sat, Jan 18, 2014 5:47:35pm

Well since this is an open thread and I have been drinking. How about some Cal Smith?

Youtube Video

Maybe some Statler Brothers.

Youtube Video

Now stop and think about it. Many of the Country and Western Singers of that time were pushing back against the religious right back then. What went wrong?

I don’t know. I do know my Wife’s lament.

Youtube Video

Night Lizards.

A Cold Warriors Lament.

60 BeenHereAwhile  Sat, Jan 18, 2014 8:06:30pm

re: #59 Bubblehead II

Well since this is an open thread and I have been drinking. How about some Cal Smith?

[Embedded content]

Maybe some Statler Brothers.

[Embedded content]

Flowers On The Wall - The Statler Brothers

Youtube Video

61 BeenHereAwhile  Sat, Jan 18, 2014 8:24:19pm

Masterful performance - just a man & his banjo:

John Hartford - Gum Tree Canoe

Youtube Video


This article has been archived.
Comments are closed.

Jump to top

Create a PageThis is the LGF Pages posting bookmarklet. To use it, drag this button to your browser's bookmark bar, and title it 'LGF Pages' (or whatever you like). Then browse to a site you want to post, select some text on the page to use for a quote, click the bookmarklet, and the Pages posting window will appear with the title, text, and any embedded video or audio files already filled in, ready to go.
Or... you can just click this button to open the Pages posting window right away.
Last updated: 2023-04-04 11:11 am PDT
LGF User's Guide RSS Feeds

Help support Little Green Footballs!

Subscribe now for ad-free access!Register and sign in to a free LGF account before subscribing, and your ad-free access will be automatically enabled.

Donate with
PayPal
Cash.app
Recent PagesClick to refresh
The Pandemic Cost 7 Million Lives, but Talks to Prevent a Repeat Stall In late 2021, as the world reeled from the arrival of the highly contagious omicron variant of the coronavirus, representatives of almost 200 countries met - some online, some in-person in Geneva - hoping to forestall a future worldwide ...
Cheechako
3 days ago
Views: 116 • Comments: 0 • Rating: 1
Texas County at Center of Border Fight Is Overwhelmed by Migrant Deaths EAGLE PASS, Tex. - The undertaker lighted a cigarette and held it between his latex-gloved fingers as he stood over the bloated body bag lying in the bed of his battered pickup truck. The woman had been fished out ...
Cheechako
2 weeks ago
Views: 278 • Comments: 0 • Rating: 1