开发者

Coldfusion seems to get caught up loading UDF's

开发者 https://www.devze.com 2023-01-18 14:19 出处:网络
I am currently running too many sites on a server and I don\'t think the template cache can handle it.But, what really seems to be the biggest drag is when I load my UDF library p开发者_如何学编程er s

I am currently running too many sites on a server and I don't think the template cache can handle it. But, what really seems to be the biggest drag is when I load my UDF library p开发者_如何学编程er site. I say this because whenever I run Fusion Reactor to see where the holdup is, the stacktrace is always sitting on the template that loads the UDF's.

Is the only cure for this more RAM and a higher template cache, or is there a better way?

Maybe I am wrong as well, could there be another issue?


Before increasing the heap and template cache available, look at a few things.

First, do you actually have more templates in the system than you have template cache? If not, increasing it certainly won't help. Even if you do, if they aren't called often, it probably won't help, but that's harder to measure.

Second, examine whether the server is having difficulty actually loading the UDFs, or if the page is having a problem executing a UDF. Are the functions included on the same template that calls them?

Third, find out why it take so long to load this UDF library. Is it really that big? Can it be split into smaller libraries? Is there one (or more) particular UDF that seems to hang the compile process?

Finally, if there is a large UDF library that must be loaded for each request, I would look at using the Application scope to store it. Include the librar onApplicationStart(), then reference functions as application.myFunction(). This prevents CF from needing to load (and possibly compile) the file at each request.

0

精彩评论

暂无评论...
验证码 换一张
取 消