Here's the time about the Tom how to move the predestation in the solana devnet, the uPolzuy rust:
Title:
Optimization Using Memory on Devnet with Involved predells in rust
Edit
Solana - a fast and scale blockchain platform, but its highly scattered treats can be taken by the memory. When you enter the solana, it is important to manage to memorize that it is possible to prevented melting work and scale. In this state, we dissatisfied with how to get the predestation on the Solana Devnet, Uspolse Rust.
Ponimania prediches
The predisposing of the precipitation is incurred on the web of the solan as the savings of the pre -resistance of the pericipular loading loads and the stabbing stabilities. These Ogranic can be set in the module Solana :: Runtime :: Limits
, which provides access to the plotting parameters of configuration for optimization of production.
Involtaevyovya predatory with help Solana :: Runtime :: Limits
To move the predestation on Devnet, you need to change the object Solana :: Runtime :: Limits
. Here's the primer of that, how to make it rust:
`Rust
Use Soolana_program :: {
Account_info :: {NEXT_ACCOUN_INFO, Accountinfo},
IntryPoint,
IntryPoint :: Programresult,
PUBKEY :: PUBKY,
};
Use solana_sdk :: {
Account_info :: {accountmeta, Programrror},
PUBKEY :: PUBKY,
};
IntryPoint! (Process_instruction);
FN Process_instruction (
Program_id: & Pubkey,
Cutting: & [Accountinfo],
Instruction_date: & [U8],
) -> Programresult {
// Repeat the predisposition
Let Limits = Solana :: Runtime :: Limits (). Compute_limit ();
// Involve the predatory
Let New_limits = Limits :: New (Limits, 10_000); // Install new predel on 10 GB
// Calculation Limits with new value
Empty mut new_limits_set = new_limits.clone ();
new_limits_set.set_compute_limit (10_000);
// Create the information structure of the utter records for the exquisite scoring
Let Limits_account_info: Accounta
and Ogranic,
"Ogranic",
Programerror :: Invalidargument,
)?;
// Availability of the Program with the help of new values
IF! Update_limits (& Limits_account_info, New_limits_set.clone ()) {
Return Err (Programror :: Invalidargument);
}
Good (())
}
In this primer we make the object Limits
, and the storage is welded for the installation of the new predicted 10 GB. We also call the insights of a score that it is possible that the accusation was firmly.
Set up predils of scrapers
To set up the predisposing for your catching records or Koshelka solana devnet, you can change the follow -up parameters of configuration:
Compute_limit
: establishes maximally the resolution of the healing in the seconds.
MAX_COMPUTTS_PER_SECOND
: Ogranchyts the quantity in a second.
Max_operations_per_account
: Ogranchyts the number of operas (for example, transaction), which can be laid out on a single cuts.
You can find more information about these parameters of configuration in the documentation solana.
The best projects for optimization of the use of memory
For the further optimization of the memory of the Devnet disseminating the following best projects:
- Use
Solana :: Runtime :: Limits
for the management of predets.
- Minimize serialization and desserialization of data.
- Optimized to repair the hiranelista with the help of efficient structures of the data (for example, masses).
- Run the sore outburst of memory with non -dean.
Realizing these strategia, you can effectively optimize the memory on your utter records or the dwellers solana devnet, causing melting work and enhancement for our prilage.