|
Posted by Ivαn Sαnchez Ortega on 01/20/06 03:04
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chung Leong wrote:
> [refactoring] [...] By definition, you are not adding new
> functionality--hence value to the product. You are thus wasting
> programming and QA resource. Moreover, you risk introducting bugs into
> what was working before. It's a lose-lose proposition.
>
> As every good engineer knows, if it ain't broken, don't fix it.
But, if it's broken, I'd better fix it for good, instead of patching legacy
code so that it "just works".
The isue we're discussing - dumping the entire query results into an array
in memory - induces lazyness in the programmers. Lazyness leads to more
complex code, more complex code leads to more bugs, more bugs leads to more
wasted QA time when something breaks down.
>> A few MB of memory per script may seem a small issue, but think about a
>> few MB per script, 100 scripts per second.
>
> That's just unrealistic. When you retrieve data from the database, it
> usually goes somewhere--i.e. to the client.
Sometimes it does not - sometimes, due to lazy programming or bad DB design,
data goes into memory, goes out of memory. And the whole thing risks
becoming a GIGO.
(but, hey, it's a "it just works" scenario! it's good for the CEO! I'm
getting paid!)
> In you scenario you'd have a server that output multiple gigs per-second.
> I don't know about you but I certainly don't have a peta-byte bandwidth
> quota.
No; in my scenario I'll just have a couple of Gigabit-ethernet-enabled
servers. And their bottleneck must be the bandwith, not the resource-hungry
scripts. The code must be so flazing fast, so fucking clean, that I'm able
to affirm the server will be able to handle the load and not choke.
- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net
Donde se pierde el interΓ©s tambiΓ©n se pierde la memoria.
-- Johann Wolfang Von Goethe. (1749-1832) Escritor alemΓ‘n.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD0DdA3jcQ2mg3Pc8RAmqiAJ0RdFNwsQZ1jGA2IpAl71RHNq44RQCfaJtK
gLEzeA51A7KxtWqtK9hxBW0=
=HcH0
-----END PGP SIGNATURE-----
Navigation:
[Reply to this message]
|