user-avatar
Today is Thursday
October 19, 2017

Tag: triphippie

September 20, 2016

Blackfire in 15 minutes helped me reduce my site load by almost 50%

by viggy — Categories: Tech, Triphippie — Tags: , , , , , , Leave a comment

Having been working on Triphippie, an adventure travel marketplace for almost one year now, its pageload time was always one of our biggest issue. We have used Prestashop for Triphippie as it helped us to go live with a complete e-commerce site in less than a week. We did not concentrate on pageload time early on as we were more focussed on improving the product pages and overall features. Due to this negligence, the page load time was around 12-14s which is pathetic, especially for an e-commerce site. However in last 2 weeks, I was forced to work on improving its pageload time. First thing that we worked on was to migrate our images to Cloudfront. We did this successfully and reduced our page load time to around 8s-9s. This was still not good.

It was clear that our server was just taking too much of time to send the response, our first byte response was still around 6.5s. It was time to use a profiler and understand what was causing this. My initial guess was that this was an inherent issue of Prestashop as it depended heavily on data stored in database. To select a profiler, coming from a Java background, my clear intuition was that I needed something which will not force me to modify code unless I wanted some very specific things. I looked around and then came across Blackfire. The main thing I noticed in its documentation is that it can used without modifying the code at all. This suited me and I immediately signed in for the free premium plan for trail.

With the registration, it took just less than 10 mins to get the Agent and PHP Probe installed on the Amazon Linux EC2 instance. I used the Google Chrome Companion of Blackfire to run the profiler. In the first run itself, I noticed that one of the module of Prestashop which we had enabled on the homepage was executing a SQL statement which took 1.1s to execute. And there was another SQL statement which took 600ms to execute. Blackfire has very intuitive UI to analyze profile runs and this makes it very easy to pinpoint issues immediately. Apart from this, most of the other time consuming part were the Smarty Template compilation which was expected.

Pageload time from Pingdom

I just disabled the module which was causing the first SQL statement and to my surprise, my page load time decreases to 4.6s, it just reduced by almost 50% of the previous time. This was probably the most efficient 15 mins that I had ever spent on improving the site. Its really great that I can now just work on improving the site while being able to very easily get the profiler run output on my test machines and make improvement based on the results.

October 20, 2015

Trek to beautiful grasslands of Kudremukh

Beautiful Grasslands of Kudremukh

Beautiful Grasslands of Kudremukh

After looking at the beautiful images of hills with stretches of grasslands, I always wanted to trek to Kudremukh. Me, Farrah and her colleague, Janaki booked our seats through TripHippie which had a fixed departure available for Oct 17th-18th weekend for Rs. 3500/- per person. The organizer of the trek was Nature Admire, which is run by Dev Balaji. I had met him couple of days before to talk about collaboration between TripHippie and Nature Admire. He has a vast experience and network in this domain and there is lot to learn for us from him. After booking through TripHippie, we received the detailed itinerary from Dev. We left for Kudremukh from Bangalore on Friday night around 10:00 pm in a tempo traveller. We reached Balegal by morning 7:00 am on Saturday. From here, we went to Mullodi in Jeep ride of 8 kms that I will never forget. It was only in videos that I had seen driving in such roads but this route will ensure that all the bones in your body is shook. The drivers here are skilful and had full control over the vehicle during the drive. After reaching the base camp at around 8:00 am, we quickly freshened ourselves and had breakfast. We then packed food items that we had brought from Bangalore along with lunch that was provided to us to carry along with other necessary items like torch, sprays and water bottles. Though as per the itinerary, we were supposed to be back to base camp by 6:00 pm and hence torch would not have been necessary, it later proved to be very helpful. With this, by 9:00 am, we were all set to start the trek.

One of the many streams during the trek with crystal clear water

One of the many streams during the trek with crystal clear water

We were quickly briefed by Balaji about the trek and do’s and don’ts during the trek. We had a local guide with us, who would lead the way for our group. There were more than 100 other trekkers who had come along with various other groups, so the trek route was crowded. The trek is 8 kms to the peak, with close to 4 kms of trek where you have steep climbing which is very tiring. However there are lot of places where you cross the streams with water so pure that you can just drink it directly. Again this was a first experience for me to just drink water directly from the stream.

View of the Kudremukh Peak

View of the Kudremukh Peak

It was very sunny and we were soon tired even just after 1 km of trekking. Balaji kept inspiring us that we will soon get comfortable once we get acclimatized to the new environment. Till now, we hadnt seen the actual peak that we had to reach. After around 1.5 kms of trek, Balaji showed us the Kudremukh Peak.

Image from Wikipedia explaining the name of the peak, kudremukh

Image from Wikipedia explaining the name of the peak, kudremukh

Kudremukh in Kannada means horse-face. Though a little difficult for me to imagine, others seem to get it easily imagine the peak as a horse face. The sight of the peak kept inspiring us apart from the sight of lush green grasslands. We were expecting rain and hence wanted to complete the trek before evening after which it would be really difficult to trek back if it rains. The local guide kept trekking easily and waiting for us to catch up with him. Our trekking team had people with varied experience with us being the complete newbies and a couple who had even visited Annapurna Base camp in Nepal. So they kept guiding us and helping us. Balaji kept reminding us to take some short breaks and have bananas, nuts and chocolates that we had brought along with us.

Our Trekking group, fully charged while climbing a steep path

Our Trekking group, fully charged while climbing a steep path

By around 1:00 pm, we were completely exhausted with close to 2 kms still to go. We had maintained a constant pace of 25-30 mins per km. Balaji stayed at the end encouraging us to keep moving forward. Looking back at the distance we had covered also kept pushing to achieve the final 2 kms to reach the peak. Also, the cloud had started becoming more dense and we expecting rain, we kept moving forward. By this time, a part of our group had already gone quite ahead.

Almost at the peak, we were able to see the clouds below us

Almost at the peak, we were able to see the clouds below us

The last 500m is almost plain and we were thrilled for having reached the peak. We were amidst the clouds and it was a great feeling of achievement and satisfaction.

Clouds at the peak

Clouds at the peak

A beautiful feeling to be amidst the clouds

A beautiful feeling to be amidst the clouds

We finally reached the peak at 2:00 pm after 5 and half hours of trek where others from our group were already waiting for us and taking rest.

TripHippie and NatureAdmire team at the peak of Kudremukh

TripHippie and NatureAdmire team at the peak of Kudremukh

From the peak where clouds were below us

From the peak where clouds were below us

We had the puliogre that we had got from base camp as lunch along with some oranges that we had carried from Bangalore. We also took a small nap of 10 mins to rest our legs. We then started our downhill trek at around 3:00 pm. Though we had expected it to be difficult due to some steep paths, we soon understood it was much easier to have climbed than to go down. Our joints and toes soon started to feel the pressure. We had thought that though difficult, we would still be faster in climbing downhill and hence would reach the base camp by around 7:00 pm with 4 hours to trek downhill. However one of our group mates sprained her leg very soon, just about 2 kms from the peak and it slowed us down. By around 6, were still at least 5 kms far from the base camp and it was already getting dark. This was where the torches that we had carried along helped us and we continued trekking downhill with the help of torch light. We had Balaji who had waited for us before the start of the dense forest. We would have definitely got lost had he not waited for us there. He kept assuring us that we keep moving slowly and carefully. We did not want anyone else to get hurt by twisting or falling. The steam which had been very welcoming while climbing up were now numbing cold. We still had to cross them and since we did not want to risk slipping on stones, we decided to walk through the numbing cold stream. It was our first experience trekking in evening through a dark forest and we were all scared except for Balaji who knew the route very well.

By around 9:00 pm, completely exhausted, we reached the basecamp and joined other members from our group. The dinner was ready along with the tents and sleeping bags for our night stay. Completely refreshed with the experience of the trek, we enjoyed the dinner and went to sleep in the cosy.

The next day, Sunday, we got up at around 9(we were supposed to get up by 6 :)) and visited the Somavathi falls. Since we were already late, we just enjoyed in the falls for an hour or so and rushed back to basecamp to pack our bags. Since most of us were exhausted from the trek, we had decided to go back to Balegal in a Jeep rather than trek back to Balegal which was the plan as per the itinerary. We also decided to skip visiting the Horanadu Temple and just stop at the Tea Estate for a while.

Beautiful Tea Estate

Beautiful Tea Estate

Valley between the tea estate

Valley between the tea estate

After this, we reached Kottigehara where we stopped for lunch. We enjoyed the Neer dosa being served there in a local hotel. Though we were expecting our body to ache due to the heavy trekking that we had done the previous day, surprisingly we did not have any such issues. Relieved we enjoyed the movies that was being played in the cab. We reached back to Bangalore at around 8:30 and as always were welcome with a huge traffic at Malleshwaram Maramma Circle. From the crystal clear water from streams and grasslands surrounding us, we were now back amidst the concrete structures of Bangalore.

Overall the trek to Kudremukh was a great experience and my first through TripHippie. I notice close to 150 more packages that are currently hosted in TripHippie which I need to experience.