Note that there are some explanatory texts on larger screens.

plurals
  1. POBetter performance? 200+ individual result pages or 200+ conditions (if else ladder or switch case?) in a single go in Javascript/Jquery Mobile
    primarykey
    data
    text
    <p>I am building a local/static mobile app using jquery mobile+phonegap. Since I want to be least dependent on getting server side, I thought to go for placing the resultant files (at least 200+ same looking pages with individual table results). For a second thought, that would certainly increase the app's size. So I came to a conclusion on having a single resultant page with conditional results. Problem is, there are approx. 200+ results.</p> <p>Hence, I'm a little confused which way to go. If a conditional statement has to be chosen, which one to go with for a better performance as I certainly might be increasing the result loading of the app, in this case, </p> <ul> <li>the if else ladder, </li> </ul> <p>like </p> <pre><code>if(someVar==1) &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; else if(someVar==2) &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; else if(someVar==3) &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; . . . . else if(someVar==200) &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; </code></pre> <p>or - the switch case?</p> <p>like </p> <pre><code>switch(someVar){ case 1: &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; break; case 2: &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; break; case 3: &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; break; . . . case 200: &lt;//Display so and so variable and image values at placeholders and header on result.html&gt;; break; } </code></pre> <p>or even containing different result pages like result1.html, result2.html, result3.html.</p> <p>Whatever could give better performance as a locally stored smartphone app (either of the 3)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload