been there, done that, fixed it, and had it blow up on low end machines because of garbage collection. good to know the unsleeping one is also human. (chapter 6 is good; still working on it)
At least you caught it early, and like Stephen says doing the profiling and testing is the redemption. =)
Worked on a project (well before I knew / understood testing etc) that was supposed to rendered an image map if the number of datapoints was less than 100 (some images would have 800 or more datapoints). The code should have been if() { foreach() } but was foreach(){ if() {} } - and went to production that way.
Suffice to say clients were complaining of slow page times in very short order. * very embarrassed developer *
I love your blog, but sometimes you leave us mere mortals confused and dumbfounded. Could we have a few lines of explanation, so that we can try to keep up!
looks like winmerge/diff to me, but i might be wrong.
anyway, there is a seemingly costly call to some engine.Storage.Nofier within a foreach loop. while it seems to have been better doing this only once, after the foreach.
but without knowing the context, this could be perfectly valid or hell breaking loose.
> Email-style angle brackets
> are used for blockquotes.
> > And, they can be nested.
> #### Headers in blockquotes
>
> * You can quote a list.
> * Etc.
Horizontal Rules
Three or more dashes or asterisks:
---
* * *
- - - -
Manual Line Breaks
End a line with two or more spaces:
Roses are red,
Violets are blue.
Fenced Code Blocks
Code blocks delimited by 3 or more backticks or tildas:
```
This is a preformatted
code block
```
Header IDs
Set the id of headings with {#<id>} at end of heading line:
## My Heading {#myheading}
Tables
Fruit |Color
---------|----------
Apples |Red
Pears |Green
Bananas |Yellow
Definition Lists
Term 1
: Definition 1
Term 2
: Definition 2
Footnotes
Body text with a footnote [^1]
[^1]: Footnote text here
Abbreviations
MDD <- will have title
*[MDD]: MarkdownDeep
FUTURE POSTS
Partial writes, IO_Uring and safety - about one day from now
Configuration values & Escape hatches - 4 days from now
What happens when a sparse file allocation fails? - 6 days from now
NTFS has an emergency stash of disk space - 8 days from now
Challenge: Giving file system developer ulcer - 11 days from now
And 4 more posts are pending...
There are posts all the way to Feb 17, 2025
RECENT SERIES
Challenge
(77): 20 Jan 2025 - What does this code do?
Answer
(13): 22 Jan 2025 - What does this code do?
Comments
Hah, we've all done it, having the strategy to not fully "trust" yourself and do stuff like profiling or writing tests is the redemption.. right?
Only human after all ;)
been there, done that, fixed it, and had it blow up on low end machines because of garbage collection. good to know the unsleeping one is also human. (chapter 6 is good; still working on it)
Almost like grabbing a new collection from the DB on every loop.
At least you caught it early, and like Stephen says doing the profiling and testing is the redemption. =)
Worked on a project (well before I knew / understood testing etc) that was supposed to rendered an image map if the number of datapoints was less than 100 (some images would have 800 or more datapoints). The code should have been if() { foreach() } but was foreach(){ if() {} } - and went to production that way.
Suffice to say clients were complaining of slow page times in very short order. * very embarrassed developer *
So, can anyone tell me what's happening here?
What tool these screenshots are from?
I love your blog, but sometimes you leave us mere mortals confused and dumbfounded. Could we have a few lines of explanation, so that we can try to keep up!
Yeah, he likes to keep us in the dark. I've seen that rethorical mechanism quite a bit on diary blogs as well ;).
Like the other bits of life are too easy.
The delegate for the NotifyOnChange also walks over all urls, which the outer foreach was also doing.
In the second shot, the iteration is taken outside the foreach loop which should speed up things quite nicely.
But then I'm probably wrong.
Cheers
Screenshots -> JetBrains dotTrace
engine.Cache.Whatever -> LoD?
looks like winmerge/diff to me, but i might be wrong.
anyway, there is a seemingly costly call to some engine.Storage.Nofier within a foreach loop. while it seems to have been better doing this only once, after the foreach.
but without knowing the context, this could be perfectly valid or hell breaking loose.
can someone what this is all about...
Comment preview