首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >对Firebase数据库的Swift请求需要19秒

对Firebase数据库的Swift请求需要19秒
EN

Stack Overflow用户
提问于 2019-01-02 03:07:55
回答 1查看 82关注 0票数 0

!!更新: Firebase可能不是问题(在半秒内获取的数据似乎出现在ViewController主屏幕上,尽管连接可能仍有问题;另外,在AddUniversal屏幕上,向Firebase数据库添加新实体会触发相同的延迟,这表明Firebase是问题所在,因为屏幕上没有大小调整或集合视图或许多其他内容)-在ViewController屏幕上,我认为问题可能存在于获取数据和插入collectionView单元(卡片视图)之间的某个地方,根据Brian Voong的垂直调整模型。我将在下面留下原始代码,并在最后留下一些Brian Voong的东西。!!

我尝试过删除加密/解密过程,删除GoogleAppEngine (加密密钥请求)的调用,以及删除图像(仅请求文本;可能小于200kB)。我还尝试了Frank van Puffelen的建议,除了我的“曾经”的侦听器之外,还添加了一个"on“侦听器。毫无办法。这个应用程序将无法使用的客户,如果我不得到它的修复。

示例代码:

代码语言:javascript
运行
AI代码解释
复制
//
//  MIProcessor.swift
//  Bizzy Books
//
//  Created by Brad Caldwell on 12/19/17.
//  Copyright © 2017 Caldwell Contracting LLC. All rights reserved.
//

import UIKit
import Firebase

final class MIProcessor {

static let sharedMIP = MIProcessor()
private init() {}

public var firstTime: Bool = false
public var mIP: [MultiversalItem] = [MultiversalItem]()
public var sIP: [MultiversalItem] = [MultiversalItem]() // the search mip!
public var mipORsip: Int = Int()
public var mIPUniversals: [UniversalItem] = [UniversalItem]()
public var mIPProjects: [ProjectItem] = [ProjectItem]()
public var mIPEntities: [EntityItem] = [EntityItem]()
public var mIPAccounts: [AccountItem] = [AccountItem]()
public var mIPVehicles: [VehicleItem] = [VehicleItem]()
public var trueYou: String = String()
public var isUserCurrentlySubscribed: Bool = Bool()
private var tHeKeY: Data!
var theUser: User!
var universalsRef: DatabaseReference!
var entitiesRef: DatabaseReference!
var projectsRef: DatabaseReference!
var vehiclesRef: DatabaseReference!
var accountsRef: DatabaseReference!
var keyRef: DatabaseReference!
var obtainBalanceAfter = ObtainBalanceAfter()
var obtainProjectStatus = ObtainProjectStatus()
var balOneAfter: Int = 0
var balTwoAfter: Int = 0
var balsAfter: [Int?] = [Int?]()
var masterSearchArray: [SearchItem] = [SearchItem]()
var authorized: Bool!
var theKeyIsHere: String!

func loadTheMip(completion: @escaping () -> ()) {
    mipORsip = 0 // MIP!
    //obtainTheKey {

        self.universalsRef = Database.database().reference().child("users").child(userUID).child("universals")
        self.projectsRef = Database.database().reference().child("users").child(userUID).child("projects")
        self.entitiesRef = Database.database().reference().child("users").child(userUID).child("entities")
        self.accountsRef = Database.database().reference().child("users").child(userUID).child("accounts")
        self.vehiclesRef = Database.database().reference().child("users").child(userUID).child("vehicles")
        self.mIPUniversals.removeAll()
        self.mIPProjects.removeAll()
        self.mIPEntities.removeAll()
        self.mIPAccounts.removeAll()
        self.mIPVehicles.removeAll()
        self.universalsRef.observeSingleEvent(of: .value, with: { (snapshot) in
            for item in snapshot.children {
                self.mIPUniversals.append(UniversalItem(snapshot: item as! DataSnapshot))
            }
            self.projectsRef.observeSingleEvent(of: .value, with: { (snapshot) in
                for item in snapshot.children {
                    self.mIPProjects.append(ProjectItem(snapshot: item as! DataSnapshot))
                }
                self.entitiesRef.observeSingleEvent(of: .value, with: { (snapshot) in
                    for item in snapshot.children {
                        self.mIPEntities.append(EntityItem(snapshot: item as! DataSnapshot))
                    }
                    self.accountsRef.observeSingleEvent(of: .value, with: { (snapshot) in
                        for item in snapshot.children {
                            self.mIPAccounts.append(AccountItem(snapshot: item as! DataSnapshot))
                        }
                        self.vehiclesRef.observeSingleEvent(of: .value, with: { (snapshot) in
                            for item in snapshot.children {
                                self.mIPVehicles.append(VehicleItem(snapshot: item as! DataSnapshot))
                            }
                            let youRef = Database.database().reference().child("users").child(userUID).child("youEntity")
                            youRef.observeSingleEvent(of: .value, with: { (snapshot) in
                                if let youKey = snapshot.value as? String {
                                    self.trueYou = youKey
                                    completion()
                                }
                            })
                        })
                    })
                })
            })
        })
    //}
}

此代码在登录过程中从ViewController.swift调用,如下所示:

代码语言:javascript
运行
AI代码解释
复制
func checkLoggedIn() {

    Auth.auth().addStateDidChangeListener { auth, user in

        if user != nil {
            // User is signed in.
            userUID = (user?.uid)!
            self.theUser = user
            if user?.photoURL == nil {
            }else{
                if let imageUrl = NSData(contentsOf: (user?.photoURL)!){
                    self.profilePic.image = UIImage(data: imageUrl as Data)
                } else {
                    self.profilePic.image = UIImage(named: "bizzybooksbee")
                }
            }
            self.masterRef = Database.database().reference().child("users").child(userUID)
            self.projectsRef = Database.database().reference().child("users").child(userUID).child("projects")
            self.entitiesRef = Database.database().reference().child("users").child(userUID).child("entities")
            self.accountsRef = Database.database().reference().child("users").child(userUID).child("accounts")
            self.vehiclesRef = Database.database().reference().child("users").child(userUID).child("vehicles")
            self.youEntityRef = Database.database().reference().child("users").child(userUID).child("youEntity")
            self.firstTimeRef = Database.database().reference().child("users").child(userUID).child("firstTime")
            self.masterRef.observe(.value, with: { (snapshot) in
                print("Do NOTTTT ANY thingggggg")
            })
            self.firstTimeRef.observeSingleEvent(of: .value, with: { (snapshot) in
                if snapshot.exists() {
                    print("Do NOT any THING")
                    if self.shouldEnterLoop {
                        self.shouldEnterLoop = false
                        self.loadTheMIP()
                    }
                } else {
                    self.initializeIfFirstAppUse()
                }
            })
            print("ONE!")
            self.masterRef.observe(.childChanged, with: { (snapshot) in // GENIUS!!!!! This line loads MIP only when an item gets added/changed/deleted (and exactly WHEN an item gets added/changed/deleted) in Firebase database IN REALTIME!!!!
                print("TWO!")
                if self.shouldEnterLoop {
                    self.shouldEnterLoop = false
                    print("THREE!")
                    if MIProcessor.sharedMIP.mipORsip == 0 {
                        self.loadTheMIP()
                    } else {
                        DispatchQueue.main.async {
                            MIProcessor.sharedMIP.loadTheMip {
                                MIProcessor.sharedMIP.obtainTheBalancesAfter()
                                MIProcessor.sharedMIP.loadTheStatuses()
                                MIProcessor.sharedMIP.updateTheMIP()
                                MIProcessor.sharedMIP.updateTheSIP(i: self.thingToBeSearchedInt, name: self.thingToBeSearchedName)
                                self.cardViewCollectionView.reloadData()//Critical line - this makes or breaks the app :/
                            }
                        }
                    }

                    DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(5), execute: {
                        self.shouldEnterLoop = true
                    })
                }
            })
            if MIProcessor.sharedMIP.mIP.count == 0 {
                print("FOUR!")
                if self.shouldEnterLoop {
                    self.shouldEnterLoop = false
                    print("FIVE!")
                    self.loadTheMIP()
                    DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(5), execute: {
                        self.shouldEnterLoop = true
                    })
                }
            }
        } else {
            // No user is signed in.
            self.login()
        }
    }
}

Brian Voong collectionView垂直大小的东西...

代码语言:javascript
运行
AI代码解释
复制
//Brian Voong inspiration... see if we can get vertical sizing of collectionview cells ie cardviews
extension ViewController: UICollectionViewDelegateFlowLayout {

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    let i = indexPath.item
    var baseHeight: CGFloat = 150
    var sentenceOneHeight: CGFloat = 0
    var sentenceTwoHeight: CGFloat = 0
    var phoneHeight: CGFloat = 0
    var emailHeight: CGFloat = 0
    var geoHeight: CGFloat = 0
    var ssnHeight: CGFloat = 0
    var einHeight: CGFloat = 0
    var imageHeight: CGFloat = 1
    switch MIProcessor.sharedMIP.mipORsip {
    case 1: // SIP!
        switch MIProcessor.sharedMIP.sIP[i].multiversalType {
        case 1: // Project
            baseHeight = 130
            if let projectItem = MIProcessor.sharedMIP.sIP[i] as? ProjectItem {
                if projectItem.projectNotes != "" {
                    if projectItem.projectNotes.count < 30 {
                        phoneHeight = 25
                    } else if projectItem.projectNotes.count < 60 {
                        phoneHeight = 45
                    } else {
                        phoneHeight = 80
                    }
                }
                if projectItem.projectTags != "" {
                    if projectItem.projectTags.count < 30 {
                        emailHeight = 30
                    } else if projectItem.projectTags.count < 60 {
                        emailHeight = 60
                    } else {
                        emailHeight = 90
                    }
                }
                if projectItem.projectAddressStreet != "" {
                    sentenceOneHeight = 140
                } else {
                    sentenceOneHeight = 100
                }
            }
            sentenceTwoHeight = 180
        case 2: // Entity
            baseHeight = 160 //92
            if let entityItem = MIProcessor.sharedMIP.sIP[i] as? EntityItem {
                if (entityItem.phoneNumber != "") || (entityItem.email != "") || (entityItem.city != "") {
                    phoneHeight = 118
                }
                if entityItem.ssn != "" {
                    ssnHeight = 30
                }
                if entityItem.ein != "" {
                    einHeight = 30
                }
            }
        case 3: // Account
            baseHeight = 140 //92
            if let accountItem = MIProcessor.sharedMIP.sIP[i] as? AccountItem {
                if accountItem.phoneNumber != "" {
                    phoneHeight = 30
                }
                if accountItem.email != "" {
                    emailHeight = 38
                }
                if accountItem.street != "" {
                    if accountItem.city != "" {
                        if accountItem.state != "" {
                            geoHeight = 50
                        }
                    }
                }
            }
        case 4: // Vehicle
            baseHeight = 140 //92
            if let vehicleItem = MIProcessor.sharedMIP.sIP[i] as? VehicleItem {
                if vehicleItem.licensePlateNumber != "" {
                    phoneHeight = 25
                }
                if vehicleItem.vehicleIdentificationNumber != "" {
                    emailHeight = 25
                }
                if vehicleItem.placedInCommissionDate != "" {
                    geoHeight = 25
                }
            }
        default: // Universal - Ie case 0 the most frequent
            var longString = ""
            if let universalItem = MIProcessor.sharedMIP.sIP[i] as? UniversalItem {
                if universalItem.notes != "" {
                    if universalItem.notes.count < 30 {
                        phoneHeight = 25
                    } else if universalItem.notes.count < 60 {
                        phoneHeight = 45
                    } else {
                        phoneHeight = 80
                    }
                }
                imageHeight = (CGFloat(universalItem.picAspectRatio) / 1000) * widthConstraintConstant
                switch universalItem.universalItemType {
                case 1: // Personal
                    baseHeight = 100
                    longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName
                case 2: // Mixed
                    baseHeight = 160
                    switch universalItem.taxReasonId {
                    case 2: // Labor ie wc
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.workersCompName
                    case 5: // Vehicle
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.vehicleName
                    case 6: // AdMeans
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.advertisingMeansName
                    default: // Nothing important
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName
                    }
                case 3: // Fuel
                    baseHeight = 70
                    longString = "At 234566 miles you paid $00.00 to " + universalItem.whomName + " for 00.000 gallons of 87 gas in your " + universalItem.vehicleName
                case 4: // Transfer
                    baseHeight = 150
                case 6: // Project Media
                    baseHeight = 80
                default:
                    baseHeight = 120
                    switch universalItem.taxReasonId {
                    case 2: // Labor ie wc
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.workersCompName
                    case 5: // Vehicle
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.vehicleName
                    case 6: // AdMeans
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.advertisingMeansName
                    default: // Nothing important
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName
                    }
                }
            }
            if longString.count < 15 {
                sentenceOneHeight = 80
            } else if longString.count < 40 {
                sentenceOneHeight = 110
            } else if longString.count < 65 {
                sentenceOneHeight = 140
            } else if longString.count < 80 {
                sentenceOneHeight = 170
            } else {
                sentenceOneHeight = 200
            }
        }
        let totalHeight = baseHeight + sentenceOneHeight + sentenceTwoHeight + phoneHeight + emailHeight + geoHeight + ssnHeight + einHeight + imageHeight
        var theWidth: CGFloat = 0
        if view.frame.width < 370 { //Protection for tiny iPhones
            theWidth = view.frame.width - 20
        } else { //Good for most iphones and safe for iPads
            theWidth = 350
        }
        return CGSize(width: theWidth, height: totalHeight)
    default: // I.e. case 0 MIP!
        switch MIProcessor.sharedMIP.mIP[i].multiversalType {
        case 1: // Project
            baseHeight = 130
            if let projectItem = MIProcessor.sharedMIP.mIP[i] as? ProjectItem {
                if projectItem.projectNotes != "" {
                    if projectItem.projectNotes.count < 30 {
                        phoneHeight = 25
                    } else if projectItem.projectNotes.count < 60 {
                        phoneHeight = 45
                    } else {
                        phoneHeight = 80
                    }
                }
                if projectItem.projectTags != "" {
                    if projectItem.projectTags.count < 30 {
                        emailHeight = 30
                    } else if projectItem.projectTags.count < 60 {
                        emailHeight = 60
                    } else {
                        emailHeight = 90
                    }
                }
                if projectItem.projectAddressStreet != "" {
                    sentenceOneHeight = 140
                } else {
                    sentenceOneHeight = 100
                }
            }
            sentenceTwoHeight = 180
        case 2: // Entity
            baseHeight = 160 //92
            if let entityItem = MIProcessor.sharedMIP.mIP[i] as? EntityItem {
                if (entityItem.phoneNumber != "") || (entityItem.email != "") || (entityItem.city != "") {
                    phoneHeight = 118
                }
                if entityItem.ssn != "" {
                    ssnHeight = 30
                }
                if entityItem.ein != "" {
                    einHeight = 30
                }
            }
        case 3: // Account
            baseHeight = 140 //92
            if let accountItem = MIProcessor.sharedMIP.mIP[i] as? AccountItem {
                if accountItem.phoneNumber != "" {
                    phoneHeight = 30
                }
                if accountItem.email != "" {
                    emailHeight = 38
                }
                if accountItem.street != "" {
                    if accountItem.city != "" {
                        if accountItem.state != "" {
                            geoHeight = 50
                        }
                    }
                }
            }
        case 4: // Vehicle
            baseHeight = 140 //92
            if let vehicleItem = MIProcessor.sharedMIP.mIP[i] as? VehicleItem {
                if vehicleItem.licensePlateNumber != "" {
                    phoneHeight = 25
                }
                if vehicleItem.vehicleIdentificationNumber != "" {
                    emailHeight = 25
                }
                if vehicleItem.placedInCommissionDate != "" {
                    geoHeight = 25
                }
            }
        default: // Universal - Ie case 0 the most frequent
            var longString = ""
            if let universalItem = MIProcessor.sharedMIP.mIP[i] as? UniversalItem {
                if universalItem.notes != "" {
                    if universalItem.notes.count < 30 {
                        phoneHeight = 25
                    } else if universalItem.notes.count < 60 {
                        phoneHeight = 45
                    } else {
                        phoneHeight = 80
                    }
                }
                imageHeight = (CGFloat(universalItem.picAspectRatio) / 1000) * widthConstraintConstant
                switch universalItem.universalItemType {
                case 1: // Personal
                    baseHeight = 100
                    longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName
                case 2: // Mixed
                    baseHeight = 160
                    switch universalItem.taxReasonId {
                    case 2: // Labor ie wc
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.workersCompName
                    case 5: // Vehicle
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.vehicleName
                    case 6: // AdMeans
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName + universalItem.advertisingMeansName
                    default: // Nothing important
                        longString = universalItem.whoName + universalItem.whomName + universalItem.personalReasonName + universalItem.taxReasonName
                    }
                case 3: // Fuel
                    baseHeight = 70
                    longString = "At 234566 miles you paid $00.00 to " + universalItem.whomName + " for 00.000 gallons of 87 gas in your " + universalItem.vehicleName
                case 4: // Transfer
                    baseHeight = 150
                case 6: // Project Media
                    baseHeight = 80
                default:
                    baseHeight = 120
                    switch universalItem.taxReasonId {
                    case 2: // Labor ie wc
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.workersCompName
                    case 5: // Vehicle
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.vehicleName
                    case 6: // AdMeans
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName + universalItem.advertisingMeansName
                    default: // Nothing important
                        longString = universalItem.whoName + universalItem.whomName + universalItem.taxReasonName
                    }
                }
            }
            if longString.count < 15 {
                sentenceOneHeight = 80
            } else if longString.count < 40 {
                sentenceOneHeight = 110
            } else if longString.count < 65 {
                sentenceOneHeight = 140
            } else if longString.count < 80 {
                sentenceOneHeight = 170
            } else {
                sentenceOneHeight = 200
            }
        }
        let totalHeight = baseHeight + sentenceOneHeight + sentenceTwoHeight + phoneHeight + emailHeight + geoHeight + ssnHeight + einHeight + imageHeight
        var theWidth: CGFloat = 0
        if view.frame.width < 370 { //Protection for tiny iPhones
            theWidth = view.frame.width - 20
        } else { //Good for most iphones and safe for iPads
            theWidth = 350
        }
        return CGSize(width: theWidth, height: totalHeight)
    }
}
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-01-21 18:01:20

我想通了!

从Firebase获取金融交易数据并不是最慢的。

问题是,在获得数据后,我从起始银行余额开始,遍历了用户的所有交易,并进行了调整,以便每个交易都显示当时的银行余额。对于几千个交易,这显然需要大量的时间。

通过将所有银行余额设置为$0.00并将计算放在后台线程中,然后在完成后更新UI,现在只需大约一秒钟即可加载(仍需等待19秒才能更新当前余额):

代码语言:javascript
运行
AI代码解释
复制
DispatchQueue.global(qos: .background).async {
                // do your job here
                MIProcessor.sharedMIP.obtainTheBalancesAfter()
                MIProcessor.sharedMIP.updateTheMIP()

                DispatchQueue.main.async {
                    // update ui here
                    self.cardViewCollectionView.reloadData()
                }
            }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54000791

复制
相关文章
tkinter 实现简单登录窗
import tkinter as tk import tkinter.messagebox import pickle # init main window(login window) window = tk.Tk() window.title('Welcome to Mofan Python') window.geometry('450x300') # welcome image canvas = tk.Canvas(window, width = 500, height = 200) image_
山海散人
2021/03/03
5690
如何在 Linux 中减少/缩小 LVM 大小(逻辑卷调整)
当你在 LVM 中的磁盘空间耗尽时,你可以通过缩小现有的没有使用全部空间的 LVM,而不是增加一个新的物理磁盘,在卷组上腾出一些空闲空间。
用户1880875
2021/09/13
3.6K0
VMware 中 Linux 调整分区大小
Precondition :VMware Player 中安装的Fedora 17 Linux 32bit,个人较久远的测试环境,安装时没有进行磁盘规划,默认20G空间(动态调整),安装在根/下。 Background :在上述环境中安装IBM DB2 Express-C 10.5(v10.5fp1_linuxia32_expc.tar.gz),安装时/tmp空间不足,无法安装。 Plan:需要进行磁盘扩容。考虑到使用VMware Player虚拟机。
gigiwangs
2019/02/28
7.2K0
Python使用鼠标滚轮调整tkinter应用程序窗口大小
在此基础上修改和增加代码,通过鼠标滚轮调整窗口大小,对小猪窗口进行缩放,鼠标放在小猪窗口上,向上滚动时放大,向下滚动时缩小。
Python小屋屋主
2020/05/08
2.4K0
Python使用鼠标滚轮调整tkinter应用程序窗口大小
C#中动态调整数组大小的代码
通常,我们创建一个数组后就不能调整其长度,但是Array类提供了一个静态方法CreateInstance用来创建一个动态数组,所以我们可以通过它来动态调整数组的长度。
用户7999227
2021/11/03
2.5K0
DICOM影像中的窗宽窗位
医学图像领域的关键技术窗技术,是CT检查中用以观察不同密度的正常组织或病变的一种显示技术,包括窗宽(window width)和窗位(window level)。由于各种组织结构或病变具有不同的CT值,因此想要显示某一组织结构细节时,应该选择适合观察该组织或病变的窗宽和窗位,以获得最佳显示。
全栈程序员站长
2022/09/07
1.5K0
在 Linux 终端调整图像的大小
ImageMagick 是一个方便的多用途命令行工具,它能满足你所有的图像需求。ImageMagick 支持各种图像类型,包括 JPG 照片和 PNG 图形。
用户4988085
2021/09/14
4.8K0
Linux调整Swap大小
关闭swap swapoff -a 1.创建交换分区的文件:增加2G大小的交换分区 dd if=/dev/zero of=/var/swapfile bs=1M count=2048 2.设置交换文件 mkswap /var/swapfile 3.启用交换分区文件 swapon /var/swapfile 4.在/etc/fstab添加 echo '/var/swapfile swap swap defaults 0 0'>>/etc/fstab 5.检查 free -m
苦咖啡
2018/04/28
9K0
git---从已有分支拉出新分支
开发中,经常需要从一个已有的分支拉出一个新分支,去这个新分支做一些开发改动,这里示例为:
IT云清
2019/01/22
3.2K0
Angularjs中模态框调整大小简单方法
代码中点击事件打开模态框,一般如下: data-ng-click="open('ui/user/timeAdd.html', 'md');" AngulerJS自带的模态框源码,调用了 $uibModal 函数 //打开模态框 $scope.open = function(url, size){ var modalInstance = $uibModal.open({ templateUrl : url, controller : 'ModalInstanceCtrl', siz
陈哈哈
2020/07/06
1.1K0
调整分区大小后分区丢失的数据
盘符不见是比较常见的数据恢复案例,需要注意,盘符不见后不要再重建新的分区。保护好文件丢失现场,可以最大程度的恢复出文件。具体的恢复方法看正文了解。
用户10127983
2023/04/09
1.9K0
如何在 Linux 中查看目录大小?
这是一篇关于如何通过一些常用的命令,显示 CentOS 或 RedHat 中的 Linux 目录大小,以及哪些文件夹占用的空间最大的教程。
章鱼猫先生
2021/10/15
13.5K0
如何在 Linux 中查看目录大小?
调整JVM内存大小
JAVA程序启动时JVM都会分配一个初始内存和最大内存给这个应用程序。这个初始内存和最大内存在一定程度都会影响程序的性能;Tomcat默认可以使用的内存为128MB,在较大型的应用项目中,这点内存是不够的,需要调大。有以下几种方法可以选用:
MonroeCode
2018/01/12
3.3K0
ASP.NET Core中如何调整HTTP请求大小的几种方式
一般的情况下,我们都无需调用HTTP请求的大小,只有在上传一些大文件,或者使用HTTP协议写入较大的值时(如调用WebService)才可能会调用HTTP最大请求值。
yoyofx
2018/09/05
3.6K0
如何在Java中调整垃圾回收(翻译)
垃圾收集是JVM在不再需要内存时代表应用程序回收内存的机制。从高层来看,它包括查找不再使用的对象,释放与这些对象相关联的内存,偶尔压缩堆以防止内存碎片化。
日薪月亿
2019/05/14
7450
ECharts散点图大小调整
在业务需求中,有时候会遇到ECharts散点图,现在记录一下,今天解决了一个小问题,ECharts散点图大小调整。
王小婷
2019/05/07
5.2K0
ECharts散点图大小调整
小程序checkbox调整大小
.cb{ transform: scale(0.6,0.6); } <view> <label class="lab" for="box1"> <checkbox value="v1" checked class="cb"/>复选框 </label> </view>
苦咖啡
2018/04/28
4.2K0
如何在Java中调整垃圾回收(翻译)
垃圾收集是JVM在不再需要内存时代表应用程序回收内存的机制。从高层来看,它包括查找不再使用的对象,释放与这些对象相关联的内存,偶尔压缩堆以防止内存碎片化。
日薪月亿
2019/05/07
9320
点击加载更多

相似问题

Tkinter动态调整窗格窗口中的小部件的大小

13

如何在tkinter窗口中调整matplotlib图的大小

11

在tkinter窗口中调整pyplot的大小

10

在基于CodeIgniter的网站中调整上传照片的大小

13

如何在Tkinter中调整按钮的大小?

37
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档