Solved

Interview question: how do you improve slow pages?

Posted on 2014-04-11
15
499 Views
Last Modified: 2014-04-14
I was asked this question in an interview yesterday

"how do you improve slow pages?"

This was my response but I wonder what the interviewer had in mind or what the correct answer is...

I said I'd check to see if the page has database calls (improve the sql), also check caching on it, and viewstate for the page.
0
Comment
Question by:Camillia
  • 6
  • 3
  • 2
  • +4
15 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 39995334
Google Pagespeed https://developers.google.com/speed/pagespeed/ has a lot of recommendations.  One of the more obvious I guess is to minimize the number of files that are loaded including images and CSS and javascript.
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995340
I also said something about images.

I wonder if what I said was incorrect. I'll take a look at the link. thanks
0
 
LVL 3

Expert Comment

by:aces4all00
ID: 39995412
It's an acceptable answer but whether or not it was the one they wanted depends on who was asking the question and why.  I can't tell you what they wanted to see but I can say what your answer would have told me had I asked the question.
1.  Most of your experience is related to 2 tier applications (your answer was limited to data a presentation layers).
2.  You're confident enough in your own coding abilities to overlook the possibility of errors that could lead to memory leaks or runaway threads (you didn't address optimizing code).
3.  Your experience working with development teams is limited (you didn't look at optimizing code others may have written).
4.  Your platform experience is limited (you didn't address possible web server, OS, or hardware limitations).
If I was asking the question I'd want to see an answer that indicated more team development experience and if I was looking to hire someone to develop solutions for in-house use I'd also want to see something that addressed possible platform related limitations (you wouldn't necessarily need to be an expert but should at least be willing to engage people that are).
0
 
LVL 10

Expert Comment

by:Korbus
ID: 39995414
I would think that step number one, is determining WHY pages are slow.  Is it too much data to transmit, or is it a problem at the server end, generating the page?  In what way is the page slow, is it slow to use, or slow to load?

It seems like a fairly vague question that needs to be responded to with more questions.
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995417
I should've mentioned #4, specially, because I worked on a system a while back and the hardware's limitation was an issue.
0
 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 167 total points
ID: 39995421
:) there has to be a gadzillion lists of things to do for this

Here's a list of 10 tips, in summary:
1. Minimize HTTP Requests
2. Reduce server response time
3. Enable compression
4. Enable browser caching
5. Minify Resources
6. Optimize images
7. Optimize CSS Delivery
8. Prioritize above-the-fold content
9. Reduce the number of plugins you use on your site
10. Reduce redirects

and here a list of 15 tips in 3 categories, in summary:
a) Server

1. Leverage browser caching
2. Enable Keep-Alive
3. Enable gzip compression
4. Make landing page redirects cacheable
5. Use a CDN

b) Content elements

1. Minimize redirects
2. Remove query strings from static resources
3. Specify a character set
4. Minify your codes
5. Avoid bad requests
6.Serve resources from a consistent URL
7. Reduce DNS lookups

c) CSS, JS and Images

1. Specify image dimensions
2. Optimize images
3. Put CSS at the top and JS at the bottom
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995422
One thing I'm, of course, noticing is that since I've been working with a propriety system for a year, I've fallen behind in .Net/SQL and definitely out of practice when it comes to being interviewed.  

I did get a job offer last week but didn't want to take a pay cut. Still, I need some catching up to do.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 10

Assisted Solution

by:Scott Thomson
Scott Thomson earned 166 total points
ID: 39995461
Personally if someone asked me that question for a tech point of view I would start with making sure I understood the question with a

Can you explain to me what you mean by slow?

You can go through and code a million pages optimizing as many things as you want but if its a user on a Windows 9X machine and you don't ask until you spend 40 hours coding you have just lost a lot of time.

It may be that the question was not necessarily a question of your ability but a purposeful vague question to see if common sense wins before coding ability..?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39995473
Portlet Paul has a good list.  However, it and the Google Pagespeed recommendations have the same problems.  #1. Web sites on shared hosting often can not change some of those things.  #2. Clients on shared hosting are frequently changing their pages in ways that Prevent good caching.  I have one page that I have changed because of client requests every day for at least a week.  Caching does no good under that circumstance.
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995506
Maybe, Scott. Good point about asking follow up questions to get a better understanding of the question.
0
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 39995510
Just based on the question it seems like they did not specify to fix what part of a slow page.. so it seems like they wanted some more prompting about what the slowness may have meant

Just my spin on it.. :)
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995514
Going thru a 90 mins interview is tiring but I know how the interviews are now.
0
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 39995525
0
 
LVL 7

Author Comment

by:Camillia
ID: 39995537
Thanks, Scott, for the link. Questions like that, I have an easy time answering.

It's the technical questions that have been getting me in the past 2 interviews. Not even the technical questions actually...it's the "live coding" session.

I will post the one I had to do yesterday. Implement an interface and write code to get the count of binary tree. It was at the of the interview and I didn't quite understand it. I did talk thru it out loud (it was a phone interview) but still...I couldn't get it right.

How would I even think in 10 or 15 mins? How can I prepare for live coding interviews? I have another 90 min one next week

The interviewer helped me with it and I have the answer but this is the question:

// write an implementation for the interface
public interface IBinaryTree<T>
{
    IBinaryTree<T> Left
    {
        get;
    }

    IBinaryTree<T> Right
    {
        get;
    }

    T Data
    {
        get;
    }
}

// implement the extension method

public static class BinaryTreeHelper
{
    public static int CountNodes<T>(this IBinaryTree<T> tree)
    {
        // Implement this
       
        
        
    }
}

Open in new window

0
 
LVL 8

Expert Comment

by:deepu chandran
ID: 39996263
async programming is one of the most important addition to improve speed
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now