Eliminating threading

I’ve just removed all threading from the ping sending code. I expect
this to have a couple of effects:

  1. A probable perceived slowdown in posting.
  2. A possible improvement in memory usage. Threading certainly causes
    pain to rubygems, and I wouldn’t be surprised if it’s causing pain
    elsewhere too.

Also in this batch of changes, I’ve shifted feedback classification to
Feedback#before_save instead of Feedback#after_save. I think it was on
after_save but then we were seeing loads of unclassified feedback.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Dec 29, 2006, at 8:39 , Piers C. wrote:

I’ve just removed all threading from the ping sending code. I expect
this to have a couple of effects:

  1. A probable perceived slowdown in posting.
  2. A possible improvement in memory usage. Threading certainly causes
    pain to rubygems, and I wouldn’t be surprised if it’s causing pain
    elsewhere too.

I tried it and it seems to work now. At least it doesn’t die after a few
page loads. I’ll report tomorrow again and tell you if the process
survived a day.

Urban


http://bettong.net - Urban’s Blog

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFlVTJggNuVCIrEyURAq+CAKCf0/N7NZf2v/aLSe1oll10NygA9gCfdrK1
gFTeaRiallh2sUdrya60B1o=
=hYxH
-----END PGP SIGNATURE-----

Thanks. I this was one of those “looked like a good idea at the time”
patches that probably shouldn’t have went in in the first place.

I wish that dealing with background processing wasn’t such a pain with
Rails. Ugh.

Scott

Urban H. [email protected] writes:

I tried it and it seems to work now. At least it doesn’t die after a few
page loads. I’ll report tomorrow again and tell you if the process
survived a day.

Cool.

“Scott L.” [email protected] writes:

Thanks. I this was one of those “looked like a good idea at the time”
patches that probably shouldn’t have went in in the first place.

I wish that dealing with background processing wasn’t such a pain with
Rails. Ugh.

I keep thinking of hacking in a ‘post_response’ plugin to run the kind
of cleanup that can be done after a request, but I never quite get
round to it.

I really like threads for this sort of thing. Pity Ruby’s threads
are so weak, and double pity that Rails freaks out if you even
mention the word “thread” around it.

Scott

“Scott L.” [email protected] writes:

I really like threads for this sort of thing. Pity Ruby’s threads
are so weak, and double pity that Rails freaks out if you even
mention the word “thread” around it.

Discovering that the gems system isn’t threadsafe was a bit of a
shock…

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Dec 29, 2006, at 20:31 , Piers C. wrote:

I tried it and it seems to work now. At least it doesn’t die after
a few
page loads. I’ll report tomorrow again and tell you if the process
survived a day.

Cool.

Well, it did survive! So it seems this patch fixed my problem. Thanks!

Urban


http://bettong.net - Urban’s Blog

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFlk/VggNuVCIrEyURAlkCAJ4lAydepBHJTWjQ9x70NY1b2pYLIQCcDdGs
LjSI/g3nhmXYHWZPDfoUU2A=
=NW7l
-----END PGP SIGNATURE-----

Urban H. [email protected] writes:

problem. Thanks!
Yay!