{"id":21880481,"url":"https://github.com/brucewind/juao","last_synced_at":"2025-06-23T06:36:27.364Z","repository":{"id":92556038,"uuid":"245128699","full_name":"BruceWind/Juao","owner":"BruceWind","description":"🚄 fast cache much more  than JVM heap memory  in Android.(在安卓上利用更多的物理RAM,快速地存取巨量的Java对象)","archived":false,"fork":false,"pushed_at":"2024-01-05T13:46:05.000Z","size":1417,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T06:42:02.311Z","etag":null,"topics":["android","bitmap","bitmap-cache","cache-storage","java","memory-cache","memory-hacking"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BruceWind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-05T10:07:31.000Z","updated_at":"2023-05-03T12:13:24.000Z","dependencies_parsed_at":"2025-04-15T05:07:23.801Z","dependency_job_id":"6d2816d1-2e86-4934-b601-cf8fbb9c1235","html_url":"https://github.com/BruceWind/Juao","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BruceWind/Juao","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FJuao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FJuao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FJuao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FJuao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BruceWind","download_url":"https://codeload.github.com/BruceWind/Juao/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FJuao/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261430372,"owners_count":23157158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bitmap","bitmap-cache","cache-storage","java","memory-cache","memory-hacking"],"created_at":"2024-11-28T09:14:07.654Z","updated_at":"2025-06-23T06:36:22.354Z","avatar_url":"https://github.com/BruceWind.png","language":"Java","readme":"# Juao ![Build APK](https://github.com/BruceWind/Juao/workflows/Build%20APK/badge.svg?branch=master)![runUnitTest](https://github.com/BruceWind/Juao/workflows/runUnitTest/badge.svg)\n\n[中文](https://github.com/BruceWind/Juao/blob/master/README_zh.md)\n\n\u003e [Juao](https://www.wikiwand.com/zh-cn/%E9%B3%8C) (巨鳌), a hugest animal in traditonal Chinese legend, looks like a tortoise could float up moutain or land from the ocean.\n\n![](https://github.com/BruceWind/Juao/raw/master/image/juao.png)\n\nIn most Android devices, enven though the physical memory (RAM) is very large, but often the memory that app can use is not much more than [JVM heap size](https://developer.android.com/topic/performance/memory#CheckHowMuchMemory).\nWhen you have a huge amount of memory that needs to calculate on Android, may you think your can't alloc enough memory.\nSo I made this library. (It is fact that just few people get in the situation.)\nIf you need to deal with super-large image on devices which is lower than Android 8.0, you must need this library.\n\nWhile your memory is caching in **Juao**, both put and pop will be very fast.\nI made an example of caching Bitmap in there. The bitmap put and get from cache is really fast. In the example, I divided a panoramic image into many images, and then merged those to display.\n\n\nI don't recommend using this repo to cache bitmaps on devices higher than 8.0, because [bitmap pixel data was already stored in native heap when device higher than 8.0](https://developer.android.google.cn/topic/performance/graphics/manage-memory).\n\n\nIn addition, I would enable about 40% of the physical RAM.\n\n\nCurrently,caching for **Bitmap, Parcelable, and Serializable** are supported by **Juao**. It capable of supporting other types. \n\nI may develop caching byte[] in the future.\n\n## How it work?\nUse [DirectByteBuffer](https://chromium.googlesource.com/android_tools/+/2403/sdk/sources/android-22/java/nio/DirectByteBuffer.java) \n to cache bytes on memory which is physical memory. If cache bytes over limitation that you set, bytes will be cached on disk.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucewind%2Fjuao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrucewind%2Fjuao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucewind%2Fjuao/lists"}