Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Why is there no "Download code" link next to Reply?

by bart (Canon)
on Oct 16, 2003 at 09:58 UTC ( [id://299696]=note: print w/replies, xml ) Need Help??


in reply to Re: Why is there no "Download code" link next to Reply?
in thread Why is there no "Download code" link next to Reply?

Eh, what? Just open the reply by itself in another browser window, or in a new tab if your browser supports it, and there there's a "download code" link.

If you can't be bothered to go over an intermediate page, you can't go to the page with just the code, either.

  • Comment on Re: Re: Why is there no "Download code" link next to Reply?

Replies are listed 'Best First'.
Re: Re: Re: Why is there no "Download code" link next to Reply?
by liz (Monsignor) on Oct 16, 2003 at 10:18 UTC
    Going to the page with just code is pretty fast in PM. That makes sense since the server doesn't need to do a lot. But when it takes 30+ seconds for an intermediate page to render, I tend not to be bothering as well. Which is a shame.

    In my view, the intermediate page is waisting server resources, as it does not really bring anything new, apart from the link to the code download. If the link would be directly available, it would save on the server side as well as on the client side. And as far as I understand, no extra database access would be needed to create the link. So it would only be a little bit more CPU and some more HTML output.

    I have no idea whether the slowness of PM is caused by CPU or (database) IO starvation. If it's IO starvation, then some extra CPU would not be a problem.

    What then remains is the question whether the extra bandwidth needed for the extra HTML compares to the bandwidth saved by the extra page not having to be sent. Looking at the amount of whitespace in the HTML sent by PM, and the fact that it does not seem to support gzip encoding, leads me to conclude that the possible extra bandwidth should not be a problem either.

    Liz

      The slowness of PM is caused by DB slowness. (It's IO from the point of view of the web server. I don't know if it's CPU or disk from the point of view of the DB server, so I hesitate to call it "IO" without further specificis.) And actualy,your idea would cause a check if the cached version of downloadcode is up to date for each note displayed. But that's very minor compared to the overhead of displaying a new (full) page.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

        why would it have to cause any further lookup? the node_id of the replies are in the HTML already, couldn't you just add a link to the node with displaytype=displaycode added?

        some code here

        Download this Code

        ... But that's very minor compared to the overhead of displaying a new (full) page...

        But the replies are rendered many more times than a new full page. I was living under the wrong assumption that my change would not require a new database access. If it does so, I think I'll withdraw my suggestion as it most likely will make things worse with regards to response times on PM.

        Liz

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://299696]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found