# SDK Latency

The Hackle SDK is implemented to operate **without network calls**. This means it can handle A/B test variation distribution, Feature Flag decisions, Remote Config lookups, and event tracking without slowing down your website, app, or server.

During initialization, the SDK fetches configuration data for A/B Tests, Feature Flags, and more from the Hackle server and stores it internally. Subsequent distribution based on the configuration is processed using the stored data. Since no network call is needed, the distribution logic is processed quickly.

Additionally, event data collected through the SDK is not sent to the server immediately. Instead, it is temporarily stored inside the SDK and sent asynchronously to the server in batches at regular intervals. Since no network call occurs during the event tracking `track()` process, data can be handled without any latency.

Client and Server SDKs are designed to match the characteristics of their respective environments, and there are minor differences in how they behave accordingly.

### Client-side SDK

![](/files/RK9xA2Ky8MVAImhv1zrX)

1. During SDK initialization, configuration data set in the Dashboard is fetched and stored in the SDK. You can also fetch it periodically or on demand.
2. When calling A/B tests, Feature Flags, or Remote Config, the operation is processed using only the configuration data stored inside the SDK, with no network call. When calling event tracking, events are not sent to the server immediately but are only stored in internal storage.
3. Collected events are periodically sent to the Hackle server asynchronously via background tasks. When the app closes or the website is navigated away from, any remaining events are sent to the Hackle server.

### Server-side SDK

![](/files/2w67CG8NUUbnNodITdmm)

1. During SDK initialization, configuration data set in the Dashboard is fetched and stored in the SDK. The latest configuration data is then fetched every 10 seconds.
2. When calling A/B tests, Feature Flags, or Remote Config, the operation is processed using only the configuration data stored inside the SDK, with no network call. When calling event tracking, events are not sent to the server immediately but are only stored in internal storage.
3. Collected events are periodically sent to the Hackle server asynchronously via background tasks.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hackle.io/en/development-guide/sdk/sdk-latency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
