Hi Matt. Do you can share this technique about store application/request vars in DB ? Interesting...
I use request scope.Declaration is short and simple.No resource
drain noticeable.
Are all shared scope reads safe to no lock now?I thought it was only
session var reads that were
Spectrum Web Design wrote:
Hi Matt. Do you can share this technique about
store application/request vars in DB ? Interesting...
Sure, but given CF 6+'s handling of shared memory vars, I wouldn't
consider this unless you are on CF 5 or need to be compatible with it.
Anyway...
I have a table
p.s. leave that silly maxrows statement out.
--Matt--
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
On Friday 23 Apr 2004 16:17 pm, Matt Robertson wrote:
cachedwithin=#CreateTimeSpan(0,0,0,10)#
Just a quickie, but you can put a fractional day here, rather than doing a
createTimeSpan() for every page request.
cfdump a createTimeSpan call to see what I mean.
--
Tom Chiverton
Advanced
Thomas Chiverton wrote:
you can put a fractional day here, rather than doing a
createTimeSpan() for every page request.
Yes, ever since Michael posted that on HoF I've been doing it, and it
makes a lot of sense.I still use CreateTimeSpan when I plug in
parameters instead of hardcoding the
-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 8:29 AM
To: CF-Talk
Subject: Re: Application vs Request scope
On Friday 23 Apr 2004 16:17 pm, Matt Robertson wrote:
cachedwithin=#CreateTimeSpan(0,0,0,10)#
Just a quickie, but you can put a fractional
Which is more readable?
#createTimeSpan(0, 0, 0, 10)#
0.000115741
Sure, the execution time is slightly less for the latter, but
if you care about that last few microseconds, I'd highly
recommend dumping CF for assembler.The beauty of CF is that
it's really easy to learn, code, read
Hello all,
I've been doing CF development for quite some time and as such im fairly
set on the way I do things. However I just had a debate with another
developer regarding which scope was proper for setting application wide
variable (such as DSN names, file paths etc) in regards to locking /
I use request scope.Declaration is short and simple.No resource drain noticeable.
Are all shared scope reads safe to no lock now?I thought it was only session var reads that were completely safe.
Another thing I use a lot of is a cached db query.I'll have a table with a structure that has a
have to
flush, and you never flush when it's not needed.
Cheers,
barneyb
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 1:48 PM
To: CF-Talk
Subject: Re: Application vs Request scope
I use request scope.Declaration is short
Are all shared scope reads safe to no lock now?I thought it
was only session var reads that were completely safe.
No, im MX they are all safe - you only have to worry about race conditions.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Barney Boisvert wrote:
In CFMX, everything is completely safe to use without any locking.
You only ever need to lock for race conditions.
*everything* as in reads AND writes?I could have sworn the rule was reads only.
OMIGOD I helped propagate another locking thread.There's only one honorable
developer ]
4 Guys Interactive, Inc.
281.807.4344 x1716
_
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 3:57 PM
To: CF-Talk
Subject: RE: Application vs Request scope
Are all shared scope reads safe to no lock now?I thought it
was only session var reads
To: CF-Talk
Subject: RE: Application vs Request scope
Barney Boisvert wrote:
In CFMX, everything is completely safe to use without any locking.
You only ever need to lock for race conditions.
*everything* as in reads AND writes?I could have sworn the
rule was reads only.
OMIGOD I
Chris Alvarado wrote:
Can you please describe a race condition to me?
I know what it means conceptually, basically when you have one thing
that needs to happen before another an not simultaneously, but I cant
really think of an instance where this would be the case.
Imagine the foloowing
.
Cheers,
barneyb
-Original Message-
From: Chris Alvarado [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 2:12 PM
To: CF-Talk
Subject: RE: Application vs Request scope
Can you please describe a race condition to me?
I know what it means conceptually, basically when you
with
proper locking.
On MX I use the Application scope.Locking for global variables (write
once, read many) can be safely ignored.
Jim Davis
_
From: Chris Alvarado [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 4:28 PM
To: CF-Talk
Subject: Application vs Request scope
Hello all
oi CF-Talk,!!
ok don't flog me.. but since most app variables are locked and set to a
request scope..is there any loss of performance or is just putting all
app scoped variables as request scoped variables in the application.cfm
acceptable...?
etc etc
--
Critz
: [EMAIL PROTECTED]
Yahoo IM : morpheus
My ally is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 2:58 PM
To: CF-Talk
Subject: Application vs Request
oi CF-Talk,!!
ok don't flog me
oi CF-Talk,!!
ok don't flog me.. but since most app variables are locked and
set to a
request scope..is there any loss of performance or is just
putting all
app scoped variables as request scoped variables in the
application.cfm
acceptable...?
The performance
should I look at what I am doing and maybe go a
different route?
Thanks
Paul Giesenhagen
- Original Message -
From: Dave Carabetta [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 2:13 PM
Subject: Re: Application vs Request
oi CF-Talk,!!
ok don't
Jedi Master for Macromedia
Email: [EMAIL PROTECTED]
Yahoo IM : morpheus
My ally is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 3:21 PM
To: CF-Talk
Subject: Re: Application vs
Such as datasources, tablenames, table widths, colors ect.. There are
probably 30-40 in all.
Right now I set those as
cfset prefs.tablename = customer_table
cfset prefs.dsn = customers
cfset prefs.tableBGColor = FF
ect...
a little off topic, but...
if you are really concerned with
Interesting ... does anyone know if this still holds true with CFMX or not?
Paul Giesenhagen
QuillDesign
Such as datasources, tablenames, table widths, colors ect.. There are
probably 30-40 in all.
Right now I set those as
cfset prefs.tablename = customer_table
cfset prefs.dsn =
-Talk
Subject: Re: Application vs Request
Interesting ... does anyone know if this still holds true with CFMX or not?
Paul Giesenhagen
QuillDesign
Such as datasources, tablenames, table widths, colors ect.. There are
probably 30-40 in all.
Right now I set those as
cfset
25 matches
Mail list logo