首页 \ 问答 \ 频繁写入的iOS上的mmap性能(mmap performance on iOS with frequent writes)

频繁写入的iOS上的mmap性能(mmap performance on iOS with frequent writes)

我在绘图应用程序中使用iOS上的mmap函数。 我有一个使用mmap的文件,然后从该内存中创建一个CGBitmapContext 。 用户可以用它们的手指在这个CGBitmapContext上执行许多核心图形操作,这将导致内存不断更新。

这种刷新频率多久会闪存到闪存存储器,这是闪存存储器还是性能问题? 我没有注意到我的测试有什么不好,但是我对mmap


I am using the mmap function on iOS in a drawing app. I have a file that uses mmap and then I create a CGBitmapContext from that memory. The user may perform many core graphics operations on this CGBitmapContext with their finger, which will cause the memory to be updated constantly.

How often will this flush to the flash storage and is this a concern for wearing out the flash storage or for performance? I haven't noticed anything bad in my tests, but I am not familiar enough with mmap to know for sure.


原文:https://stackoverflow.com/questions/19742690
更新时间:2022-06-27 15:06

最满意答案

如果设置了$_POST['search']$db->disconnect(); 所以它无法在您的表单中运行查询。

$db->disconnect(); 超出你的if()语句,并把它放在文件的末尾。


If $_POST['search'] is set, you $db->disconnect(); so it can't run the query in your form.

Take the $db->disconnect(); out of your if() statement, and put it at the end of the file.

相关问答

更多
  • 有一些API方法可用。 请参阅developer.mozilla.org 。 不过,我强烈建议您在依靠HTML5验证之前仔细思考。 在这个时候它肯定有一些主要的缺点,因为它仍处于“初期阶段”。 我现在说,你最好使用JS验证库; jQuery验证非常好。 There are some API methods available. See developer.mozilla.org. However, I would strongly advise you think carefully before rely ...
  • 取出添加
    建议: -为div和form使用不同的id $('#form').submit(function() { $(this).parent().hide() $('#hidden1, #hidden').show() }) suggestion:- use different ids for div and form $('#form').submit(function() { $(this).parent().hide() $('#hidden1, #hidden').s ...
  • 第一种解决方案是在表单内添加一个隐藏的输入字段,如下所示: $('#sort_by').change(function(){ $('#myInput').val($(this).val()); $("#search_form").submit(); }); 请记住从选择中删除名称属性 如果你使用ajax函数,你也可以建立一个FormData对象并附加你的所有数据(docs https:// ...
  • 做这个 : $(document).ready(function(){ $("#frm1").submit(); }); Do this : $(document).ready(function(){ $("#frm1").submit(); });
  • 如果设置了$_POST['search']则$db->disconnect(); 所以它无法在您的表单中运行查询。 取$db->disconnect(); 超出你的if()语句,并把它放在文件的末尾。 If $_POST['search'] is set, you $db->disconnect(); so it can't run the query in your form. Take the $db->disconnect(); out of your if() statement, and put ...
  • 我使用了form.$setPristine(); 在创建功能 self.createCitizen = function(form){ if(form.$valid){ $http.post(apiUrl + endpoint, self.citizen).then(function(response){ alertsService.add('success', 'Morador criado com sucesso!'); form.$setPristine(); ...
  • 检查一下, 以这种方式排列HTML表单,
    和jQuery脚本,