|
honey the monster, codewitch wrote: I did speed it up a lot by implementing a remedial cache My #1 goto when I've got some slow running code
I once gained a performance boost by removing a method and putting the code in the calling method instead.
I think it was a loop, so instead of:
foreach (var item in items)
{
Method(item);
}
private void Method(Item item)
{
} I got:
foreach (var item in items)
{
} It went from over a second to a few milliseconds.
I'm not sure why there was such a performance penalty in invoking the method (probably a few thousand times).
It was an older version of .NET anyway, either 3.5 or 4(.0), I've never seen it since.
If you're dealing with an ORM, going to a manually written query (or completely ditching the ORM at that point) can also greatly boost performance.
And the difference between a debug build and a production build can sometimes be pretty big as well.
Fixing performance bottlenecks can be fun and rewarding, but it can also be a real PITA
|
|
|
|
|
Yeah, the difference between Debug and Release performance on my FA code is phenomenal.
Speaking of performance, I got this routine pretty fast. Turns out there was one area in my code that wasn't using the cache because it was older code.
Fixed, and boom, free perf!
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
5GB to backup!
internal SSD to external SSD on USB 3.1 gen 2
20 seconds including time to grab and plug in and out the external.
and being paranoid I always do double backups (and an internal mirror)
... oh the pain!
Message Signature
(Click to edit ->)
|
|
|
|
|
lopatir wrote: internal SSD to external SSD on USB 3.1 gen 2 don't complain... USB 2.0 is still much slower
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
'Taint nothin. We copied 600 and some gigs from one server to another today.
But nothing says Saturday like computer maintenance.
|
|
|
|
|
I just launched my backup batch file before leaving for the evening. Roughly 4TBs worth of VHDs. When I come back, that drive will be rotated with another, which will then also be brought up to date overnight. Since I won't be around (or sleeping), that essentially translates to no real downtime.
My NAS (8TB) doesn't take nearly that long--robocopy is smart enough to skip files that haven't changed. No such luck with VHD files however; if a VM is merely powered up, that's enough to mark the file as changed, so that's a few dozen GBs that get added to the backup pile instantly.
|
|
|
|
|
dandy72 wrote: owever; if a VM is merely powered up, that's enough to mark the file as changed, so that's a few dozen GBs that get added to the backup pile instantly
with virtualbox if you take a snaphot only the latest ss file get's modded.
usually after setting up a vm (o/s, required apps I'll do a double snapshot, want to roll back to clean state or/and add things to the base roll back to the first ss (and do any new "base mods" there). means even then the usually huge base: os & core apps) stays un-modded.
do regular snaps (daily/weekly/monthly depending on how much happens/matters) to keep daily backup fast and sensible. Every half dozen or so snaps merge them back into base+1 or base+2 then take another snap and carry on. (if base+1 snap starts to get too large add another layer.)
it may seem counter productive , a potential performance hit or just somehow bad to have too many snaps, but in fact not at all*. with regard to performance snaps are no different to disk file fragmentation (i.e. on zero seek time media such as SSD no impact at all.)
* the entire block allocation tables always live in the last snap so regardless how many snaps you have, and in which snap the file/block you seek is located it's a O(1) lookup.
BTW, this means any [potential] delays caused by 'having [too] many snaps' are entirely of the host o/s and it's file system. ... which is why serious VM users and almost all providers (including ms [azure]) prefer linux/BSD for VM hosts [way way better large volume/tree file systems].
merging snaps: all merging does is clean out the redundant/previous copies of the same file(s)/block(s) ==> merging snaps only optimizes space, not time, speed or performance. (unless once again a on a sucky host).
OTOH though I also do merging because it looks 'cleaner', and can also take the opportunity to put more descriptive titles on those important snapshots so they won't get so easily lost in a long long long file/snap list. (host disk space is not an issue... yet)
Message Signature
(Click to edit ->)
modified 11-Aug-19 1:35am.
|
|
|
|
|
lopatir wrote: with virtualbox if you take a snaphot only the latest ss file get's modded.
True. I'm familiar enough with snapshot (or checkpoints, as Hyper-V prefers to call them), but I never thought of it this way. You're absolutely right.
Part of my problem, I guess, is that I try to keep everything as a single file so it's simply easier to manage. I bring all my VMs up to date on every Patch Tuesday, and so my "one VHD" is always clean and up to date. I'll only take a snapshot if I'm about to install something temporarily and I want to clean it up afterwards. If I was to take multiple snapshots, then you're right, the base OS (the larger files) would hardly ever change.
But again, I would still prefer to merge everything back into the "base image" after every Patch Tuesday, so that means that base image still changes at least once a month. Hmmmmmmm…
|
|
|
|
|
lopatir wrote: and being paranoid I always do double backups (and an internal mirror)
One man's paranoia is another man's standard procedure.
|
|
|
|
|
|
Going back to my infancy as a Computer users, my oldest backups (I've still got them!) were paper tapes punched at 10 bytes (characters) per second. But let's forget those days...
My oldest file storage were 360 Kbyte floppies. A few years later, that was multiplied by a factor of 100: My first PC disk could hold 40 Mbytes. Another few years, I had started editing digital video, and bought an enormous disk 1000 times as big, 40 GBytes. Today, my video archive fills disks 100 times bigger, 4 Tbytes (and I have got four of those).
The unit size of my file storage has increased by a factor of ten million from the floppy days. Even if we limit it to hard disks, there is a factor of 100,000. I don't remember how long it took to back up my first 40 MByte hard disk. But at the same transfer speed, backing up my 4 TByte disk would have taken as many days as the 40 MByte required seconds. (A day is 86,400 seconds.) Fortunately, interface speeds have increased, but not by a factor of 100,000!
We tend to forget that going from mega to giga, or from giga to tera, isn't just "one higher". It isn't even "one magnitude higher". It is three magnitudes higher, a factor of a thousand.
|
|
|
|
|
Already got a gaming computer, a RAM upgrade (32G) and a Weighted Blanket (which actually helps me sleep).
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
No point in my getting a weighted blanket - Herself would still roll it around her like a sausage roll duvet.
And then complain that the weights "were uncomfortable"
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I have dog that thinks she's a weighted blanket, doesn't help me or the missus sleep though.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Perhaps it's best to let sleeping dogs lie? Although I think it's time they learned to tell the truth.
/ravi
|
|
|
|
|
Perhaps! Quote: let sleeping dogs lie Now I have to listen to the MSG album[^] on the way home tonight.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Hmm, am not familiar with them. Perhaps I should be... gonna look for them on YouTube. Thought I have to rehearse some James Taylor and CSN for a solo gig tomorrow.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: James Taylor and CSN for a solo gig tomorrow. Nice, hope it goes well!
I'm a big Michael Schenker fan from way back, love his sound.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Brisingr Aerowing wrote: a Weighted Blanket (which actually helps me sleep Did you meet her on-line ?
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Well, Dam!
Okay it's Saturday and no ones around and I'm bored
Technician
1. A person that fixes stuff you can't.
2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge.
JaxCoder.com
|
|
|
|
|
I once met a nice lady with big jugs.
|
|
|
|
|
PIEBALDconsult wrote: I once met a nice lady with big jugs.
"Holding water". Ok, I'll give you the benefit of doubt. I'm sure you meant, literally, jugs. Who am I to guess your intent...
I still remember an episode of Married with Children where Al Bundy's mother-in-law commented that she isn't fat, she's just "retaining water"...to which Al responded, "so does the Pacific ocean".
Nobody would dare make a sitcom like that these days...
|
|
|
|
|
Or an ad like this: Does my bum ...[^]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I have no idea what the guy said...neither does Youtube's automated closed captioning, it seems. I did kinda get the intent with the CC's "focus off your face"...which I can sorta hear...but not the rest of it.
|
|
|
|
|
"Does my bum look big in this?"
"Yeah - but at least it takes the focus off yer face."
And that's when the fight started.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|