GBoard library with optimized memory usage