Now add a timing helper and instrument the key phases. Let me add it near the top, after the includes.


No matches found


Grep

^// ---.*S2|^// ---.*cell|^static int kStreet"


115:// --- Deferred S2 work items (computed in parallel after PBF read) ---
142:// --- Thread pool for concurrent admin polygon S2 covering ---
269:// --- S2 helpers ---

[Showing results with pagination = limit: 3, offset: 0]


   110→private:
   111→    std::unordered_map<std::string, uint32_t> index_;
   112→    std::vector<char> data_;
   113→};
   114→
   115→// --- Deferred S2 work items (computed in parallel after PBF read) ---
   116→
   117→struct DeferredWay {

private:
    std::unordered_map<std::string, uint32_t> index_;
    std::vector<char> data_;
};

// --- Deferred S2 work items (computed in parallel after PBF read) ---

struct DeferredWay {


Edit

// --- Deferred S2 work items (computed in parallel after PBF read) ---

// --- Phase timer ---
struct PhaseTimer {
    std::chrono::steady_clock::time_point start;
    const char* name;
    PhaseTimer(const char* n) : start(std::chrono::steady_clock::now()), name(n) {
        std::cerr << "  [TIMER] " << name << " started" << std::endl;
    }
    ~PhaseTimer() {
        auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
            std::chrono::steady_clock::now() - start).count();
        std::cerr << "  [TIMER] " << name << " completed in "
                  << elapsed / 1000 << "." << (elapsed % 1000) / 100 << "s" << std::endl;
    }
};

// --- Deferred S2 work items (computed in parallel after PBF read) ---