---
title: How a 1-Day Initiative Helped Us Cut 1200$ Cost and Improve Performance
description: Discover how a one-day initiative at Optiblack led to a $1,200 cost reduction and improved app performance through innovative in-house country detection.
---

[Insights](https://optiblack.com/insights)

# [How a 1-Day Initiative Helped Us Cut 1200$ Cost and Improve Performance](https://optiblack.com/insights/how-a-1-day-initiative-helped-us-cut-1200-cost-and-improve-performance)

 Written by [Nandini Sharma](https://optiblack.com/insights/author/nandini-sharma) | Apr 28, 2026, 10:18:04 AM

At Optiblack, some of the most impactful improvements don’t come from client requirements—they come from internal ownership and curiosity. This was one such initiative.

While working on **multiple** apps for a client, our team noticed we were relying on IPAPI for country detection. It was working fine—but came with recurring costs (~$20/month), added latency, and an external dependency we didn’t fully control.

So we asked: *Can we build a better, leaner solution ourselves?*

#### **The Effort: 1 Day Research + 6 Hours Build**

This wasn’t a client requirement—it was a proactive engineering decision.

- **Day 1:** Researching alternatives (GPS, device locale, offline datasets)
- **Next 6 hours:** Building and integrating a local detection system across both apps

What started as a quick experiment turned into a production-ready improvement.

#### **The Real Impact: $40 vs $1,200**

While $20/month may seem small, over time it adds up:

- **$20/month → $240/year**
- Over a **5-year horizon → $1,200 total cost**

By replacing this dependency, we effectively turned a **$1,200 recurring expense into a one-time $40 investment**.

#### **The Solution: Local-First Country Detection**

We replaced the API with a **layered detection approach**:

**1. GPS-Based Detection (Primary)**We use device location and reverse geocoding to determine the most accurate country ISO code when permissions are available.

**2. Device Locale (Fallback)**If location access is denied, we fallback to the device’s regional settings:

String countryISO = PlatformDispatcher.instance.locale.countryCode?.toUpperCase() ?? 'US';

 

**3. Default Fallback**If both fail, we default to **“US”**, ensuring the system always returns a valid country.

#### **Local Data = Zero API Calls**

To make this system fully independent, we bundled a static JSON file (country\_codes.json) inside the app. It contains country metadata like name, ISO code, dial code, and flag:

{"name": "United States", "code": "US", "dial\_code": "+1", "flag": "🇺🇸"}

 

This allows instant mapping from ISO code to full country details—**no network calls, no latency, no failures**.

 

 

#### **Platform Considerations**

- **Android:** Uses geolocation and geocoding with proper permission handling and smooth fallback flows
- **iOS:** Relies more on device Language & Region settings when location access is restricted, ensuring privacy compliance

#### **The Outcome**

A small initiative led to meaningful impact:

- Saved ~$20/month in API costs
- Improved performance with zero API latency
- Enabled offline functionality
- Reduced dependency on third-party services

#### **Why This Matters**

This wasn’t about shipping a feature—it was about **thinking beyond requirements**. Identifying inefficiencies, taking initiative, and solving them quickly.

At Optiblack, we believe great engineering isn’t just about building new things—it’s about **continuously optimizing what already exists**.

[View full post](https://optiblack.com/insights/how-a-1-day-initiative-helped-us-cut-1200-cost-and-improve-performance)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Nandini Sharma"
  },
  "dateModified" : "2026-04-28T10:18:04.593Z",
  "datePublished" : "2026-04-28T10:18:04Z",
  "headline" : "How a 1-Day Initiative Helped Us Cut 1200$ Cost and Improve Performance",
  "image" : {
    "@type" : "ImageObject",
    "height" : 720,
    "url" : "https://25150895.fs1.hubspotusercontent-eu1.net/hubfs/25150895/Optiblack%20Vishal%20Rewari%20Product%20Analytics%20%287%29-2.png",
    "width" : 1280
  },
  "mainEntityOfPage" : "https://optiblack.com/insights/how-a-1-day-initiative-helped-us-cut-1200-cost-and-improve-performance",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://25150895.fs1.hubspotusercontent-eu1.net/hubfs/25150895/Optiblack-black-logo-2.png",
      "width" : 361.86334
    },
    "name" : "Insights"
  }
}
```