Announcement
Collapse
No announcement yet.
How much do these functions/processes weigh, as in, how processor intensive are they?
Collapse
X
-
I don't think I'd rely on data from Ivo almost 15 years after the fact; it's easy to test with logging and mvprof.
-
Originally posted by Bruce - PhosphorMedia View Post#2
Really? Maybe its bad memory but in my head is an old post from the icon Ivo Truxoff, who did a test. I think he used about 1,000 instances of 'x' CIN y compared to tolower('x') IN y and the later was at least %20/%30 faster.
Leave a comment:
-
You would do roughly this:
https://www.miva.com/forums/forum/de...ript-debug-log
which breaks down to:
1) Set your Empresa or Mia to have cookie-based logging, or just log everything if it's not a production website or internet accessible
2) Place diagtool.mvc on the site to assign your browser a unique cookie name matching what you set the log cookie to
3) Remove any prior log
4) Perform the request to the script you want to profile
5) Copy out the log before making any further requests
6) Run mvprof against the log file to generate the report on the functions that were called, iterations, time consumed by processing, etc.
7) Turn off logging when done
Leave a comment:
-
Originally posted by Bruce - PhosphorMedia View Post#2
Really? Maybe its bad memory but in my head is an old post from the icon Ivo Truxoff, who did a test. I think he used about 1,000 instances of 'x' CIN y compared to tolower('x') IN y and the later was at least %20/%30 faster.
Leave a comment:
-
David,
You could use mvprof to profile your code and see what is taking the most amount of time.
Nothing seems to be obvious. What is the typical usage? For example, If I wanted to run these utils(mvcov, mvprof) on "mycompiledmodule.mvc."
Scott
Leave a comment:
-
#2
Really? Maybe its bad memory but in my head is an old post from the icon Ivo Truxoff, who did a test. I think he used about 1,000 instances of 'x' CIN y compared to tolower('x') IN y and the later was at least %20/%30 faster.Last edited by Bruce - PhosphorMedia; 12-01-20, 10:38 AM.
Leave a comment:
-
Looks like MvPROF is a windows tool:
https://docs.miva.com/videos/install-the-compiler
Is there one for linux?
Leave a comment:
-
David,
You could use mvprof to profile your code and see what is taking the most amount of time.
I've had recent needs for a tool like this.
Scott
Leave a comment:
-
- I would avoid using miva_variable_value as much as possible. The engine has to parse the string you pass to it every time and lookup the variable. If you are able to use MvREFERENCEARRAY or similar all the parsing is done at compile time instead of runtime. With that being said, unless you are running miva_variable_value tens of thousands of times per page load I don't think you'll see too much of an impact.
- <x> CIN <y> is probably going to be technically faster but you'd never be able to measure it.
- They are essentially the same concept and you'd again probably never be able to measure a difference. Using the COUNT attribute on MvFOREACH would help out if you're using that tag a lot.
- There shouldn't be an difference really.
- Probably not going to be a big difference again unless you're doing a ton per page load.
- 1 like
Leave a comment:
-
How much do these functions/processes weigh, as in, how processor intensive are they?
I'm curious about how much the empressa engine has to work on the following:
1. To use miva_variable_Value(...) a lot
2. To use "l.something CIN l.something_else" or "tolower(l.something) IN tolower(l.something_else)"
3. MvWHILE vs MvFOREACH
4. Using a lot of big global variable structures vs passing local reference variables to functions
5. Using readytheme content sections vs executing compiled page templates
Is there a document or something that shows all the miva functions/tags listed in order of how "heavy" they are for empressa to deal with? I am curious about what the most heavy processes are so I can avoid them if possible in my coding.Tags: None
Leave a comment: