惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - sql172

好久没写了 Android自带混淆打包在windows下的一个问题 J2ME低级界面与高级界面切换的问题 关于HTTP请求中断问题 cron启动失败 对自己无语了 今天又改了下数据源 ~ .... 今天去看了华尔街2 ClassNotFoundException 返宁 自定义大小数字绘制 十一 又废了一天 V8 JavaScript 引擎 分区表的问题 J2ME 混淆编译
J2ME的repaint效率问题
sql172 · 2010-09-10 · via 博客园 - sql172

低级Canvas界面开发是J2ME开发者热衷的

paint函数的效率影响着整个程序的运行

我们经常实用局部重画,也就是repaint(x,y,w,h),但是一般paint函数会包含或调用一些教复杂的运算,那么即使我们使用的局部重画,仅仅优化的是J2ME最底层的东西

而我们在paint函数中的很多不在该区域的运算还是会进行

所以尽量在paint函数中,每部分的绘制加上判断条件,在调用局部重画时,仅仅对重画的部分进行运算,其余运算一概跳过,这样repaint的效率就高多了,特别对于多线程调用时,repaint的效率会很明显,并且最好自己封装一层repaint,里面实现线程安全