Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to remove ZENDESK instance #145

Open
CherukuriSiva opened this issue Nov 4, 2022 · 0 comments
Open

API to remove ZENDESK instance #145

CherukuriSiva opened this issue Nov 4, 2022 · 0 comments

Comments

@CherukuriSiva
Copy link

CherukuriSiva commented Nov 4, 2022

Dear contributors,

Thank you for maintaining this repo. We are using this library in one of our applications to display Zendesk chat.
It is working fine however we observed this library taking large amount of RAM(200+ MB) due to this some of our end users who are using Older android phones facing issues. Our app getting freezes and they are not able to click any of the options.

We believe once we call init() API, Zendesk instance will be created and this instance will stay in the memory entire app life cycle.
So we are looking for an API to remove Zendesk instance from the memory when end user close the Chat.
Currently we can see below APIs in this library:

class RNZendeskChatModuleImpl {
		/**
		 * Must be called before calling startChat/setVisitorInfo
		 * - (Advanced users may configure this natively instead of calling this from JS)
		 */
		init: (zendeskAccountKey: string, appId?: string) => void;

		/**
		 * Presents the Zendesk Chat User Interface
		 */
		startChat: (options: StartChatOptions) => void;
		/**
		 * Backwards Compatibility!
		 * - You can pass all these parameters to RNZendeskChatModule.startChat
		 * - So you should probably prefer that method
		 */
		setVisitorInfo: (options: VisitorInfoOptions) => void;

		/**
		 * Configure the token to start receiving Push Notifications
		 */
		registerPushToken: (token: string) => void;

		/**
		 * Check if there are available agents
		 */
		areAgentsOnline: () => Promise<Boolean>;
	}

We don't have any API to remove instance from the memory. So any guidance will be appreciated.

Please find below screenshot, which shows RAM usage before adding Zendesk library and after adding Zendesk library:
zendesk-ram-usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant